fix: mem leak

This commit is contained in:
xsren 2024-08-02 15:02:12 +08:00
parent 9b81f536a1
commit 9a8e74e0ed
1 changed files with 3 additions and 0 deletions

View File

@ -479,6 +479,9 @@ int32_t createOperator(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SReadHand
SPhysiNode* pChildNode = (SPhysiNode*)nodesListGetNode(pPhyNode->pChildren, i);
code = createOperator(pChildNode, pTaskInfo, pHandle, pTagCond, pTagIndexCond, pUser, dbname, &ops[i]);
if (ops[i] == NULL || code != 0) {
for (int32_t j = 0; j < i; ++j) {
destroyOperator(ops[j]);
}
taosMemoryFree(ops);
return code;
}