fix: nodes free issue
This commit is contained in:
parent
31d187444e
commit
ed3778dc9f
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue