fix:[TD-32450] Use taosArrayDestroyEx when error occurs to avoid mem leak.

This commit is contained in:
Jing Sima 2024-10-08 15:26:26 +08:00
parent b7d7a23eea
commit f1508db3be
1 changed files with 2 additions and 2 deletions

View File

@ -3809,13 +3809,13 @@ int32_t fltInitFromNode(SNode *tree, SFilterInfo *info, uint32_t options) {
SFltBuildGroupCtx tctx = {.info = info, .group = group};
nodesWalkExpr(tree, fltTreeToGroup, (void *)&tctx);
if (TSDB_CODE_SUCCESS != tctx.code) {
taosArrayDestroy(group);
taosArrayDestroyEx(group, filterFreeGroup);
code = tctx.code;
goto _return;
}
code = filterConvertGroupFromArray(info, group);
if (TSDB_CODE_SUCCESS != code) {
taosArrayDestroy(group);
taosArrayDestroyEx(group, filterFreeGroup);
goto _return;
}
taosArrayDestroy(group);