diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index a2e4c76adccc91d5a1f8689643f3d7a93089eba0..f8d6f1dcf92ae9accf2ee0713161dbbf9a9deb22 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -306,6 +306,7 @@ void nodesDestroyAllocator(int64_t allocatorId); SNode* nodesMakeNode(ENodeType type); void nodesDestroyNode(SNode* pNode); +void nodesFree(void* p); SNodeList* nodesMakeList(); int32_t nodesListAppend(SNodeList* pList, SNode* pNode); diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index dc244acb40eb0afb17e43097dbc012990531d371..2716f7fd7d64fed6d6d18fc1f907766bda834c39 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -486,7 +486,7 @@ int32_t getColInfoResultForGroupby(void* metaHandle, SNodeList* group, STableLis SNodeListNode* listNode = (SNodeListNode*)nodesMakeNode(QUERY_NODE_NODE_LIST); listNode->pNodeList = group; genTagFilterDigest((SNode *)listNode, &context); - taosMemoryFree(listNode); + nodesFree(listNode); if (lastTableList && (0 == memcmp(context.digest, lastMd5.digest, sizeof(lastMd5.digest)) && (taosArrayGetSize(pTableListInfo->pTableList) == taosArrayGetSize(lastTableList)))) { pTableListInfo->pTableList = taosArrayDup(lastTableList, NULL); diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index eff69e97648166b1b16733c0b48e00867a4c4d1c..35860196e4145fbd31b1ac0aa1fb4d257341a5ce 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -87,7 +87,7 @@ static void* nodesCalloc(int32_t num, int32_t size) { return (char*)p + 1; } -static void nodesFree(void* p) { +void nodesFree(void* p) { char* ptr = (char*)p - 1; if (0 == *ptr) { taosMemoryFree(ptr);