fix(query): fix memory leak.

This commit is contained in:
Haojun Liao 2024-09-27 09:27:58 +08:00
parent 60308ae844
commit 64cb7a1d5e
1 changed files with 2 additions and 0 deletions

View File

@ -2846,6 +2846,8 @@ static int32_t initTableblockDistQueryCond(uint64_t uid, SQueryTableDataCond* pC
pCond->colList = taosMemoryCalloc(1, sizeof(SColumnInfo)); pCond->colList = taosMemoryCalloc(1, sizeof(SColumnInfo));
pCond->pSlotList = taosMemoryMalloc(sizeof(int32_t)); pCond->pSlotList = taosMemoryMalloc(sizeof(int32_t));
if (pCond->colList == NULL || pCond->pSlotList == NULL) { if (pCond->colList == NULL || pCond->pSlotList == NULL) {
taosMemoryFree(pCond->colList);
taosMemoryFree(pCond->pSlotList);
return terrno; return terrno;
} }