fix: memory leak fix during creation of tsma

This commit is contained in:
Cary Xu 2022-07-11 19:34:30 +08:00
parent 4d22cd9c18
commit 3572520d19
1 changed files with 4 additions and 0 deletions

View File

@ -204,6 +204,8 @@ _OVER:
mError("sma:%s, failed to decode from raw:%p since %s", pSma->name, pRaw, terrstr());
taosMemoryFreeClear(pSma->expr);
taosMemoryFreeClear(pSma->tagsFilter);
taosMemoryFreeClear(pSma->sql);
taosMemoryFreeClear(pSma->ast);
taosMemoryFreeClear(pRow);
return NULL;
}
@ -221,6 +223,8 @@ static int32_t mndSmaActionDelete(SSdb *pSdb, SSmaObj *pSma) {
mTrace("sma:%s, perform delete action, row:%p", pSma->name, pSma);
taosMemoryFreeClear(pSma->tagsFilter);
taosMemoryFreeClear(pSma->expr);
taosMemoryFreeClear(pSma->sql);
taosMemoryFreeClear(pSma->ast);
return 0;
}