Merge pull request #6721 from jtcheng/bugfix/TD-6536

[TD-6536]: Fix memory leak during alter database
This commit is contained in:
Haojun Liao 2021-07-08 16:10:39 +08:00 committed by GitHub
commit dff88d8be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -938,7 +938,7 @@ void SqlInfoDestroy(SSqlInfo *pInfo) {
taosArrayDestroy(pInfo->pMiscInfo->a);
}
if (pInfo->pMiscInfo != NULL && pInfo->type == TSDB_SQL_CREATE_DB) {
if (pInfo->pMiscInfo != NULL && (pInfo->type == TSDB_SQL_CREATE_DB || pInfo->type == TSDB_SQL_ALTER_DB)) {
taosArrayDestroyEx(pInfo->pMiscInfo->dbOpt.keep, freeVariant);
}