Merge pull request #15623 from taosdata/fix/TD-18024

fix: fix in operator memory leak
This commit is contained in:
dapan1121 2022-08-01 13:32:09 +08:00 committed by GitHub
commit 3913a1c14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -140,13 +140,23 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
SCL_ERR_JRET(TSDB_CODE_QRY_OUT_OF_MEMORY);
}
colDataDestroy(out.columnData);
taosMemoryFreeClear(out.columnData);
out.columnData = taosMemoryCalloc(1, sizeof(SColumnInfoData));
cell = cell->pNext;
}
*data = pObj;
colDataDestroy(out.columnData);
taosMemoryFreeClear(out.columnData);
return TSDB_CODE_SUCCESS;
_return:
colDataDestroy(out.columnData);
taosMemoryFreeClear(out.columnData);
taosHashCleanup(pObj);
SCL_RET(code);
}