diff --git a/source/dnode/vnode/src/meta/metaCache.c b/source/dnode/vnode/src/meta/metaCache.c index 4aa6ed374440c88d525dd792705febc87cd7ebc7..45f70e1c92d5eb578b95bc28fedbd7bd39dba5c2 100644 --- a/source/dnode/vnode/src/meta/metaCache.c +++ b/source/dnode/vnode/src/meta/metaCache.c @@ -90,6 +90,12 @@ static void statsCacheClose(SMeta* pMeta) { } } +static void freeCacheEntryFp(void* param) { + STagFilterResEntry** p = param; + tdListEmpty(&(*p)->list); + taosMemoryFreeClear(*p); +} + int32_t metaCacheOpen(SMeta* pMeta) { int32_t code = 0; SMetaCache* pCache = NULL; @@ -132,6 +138,7 @@ int32_t metaCacheOpen(SMeta* pMeta) { goto _err2; } + taosHashSetFreeFp(pCache->sTagFilterResCache.pTableEntry, freeCacheEntryFp); pMeta->pCache = pCache; return code; diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 6ee2dce59b72ed8ef0b336a5be21945a49801034..21fba22af4830e85f2dec641dd56b4d96bc3c709 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1017,6 +1017,7 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode, metaUidFilterCachePut(metaHandle, pScanNode->suid, context.digest, tListLen(context.digest), pPayload, size, 1); + taosMemoryFree(pPayload); } else { qDebug("retrieve table uid list from cache, numOfTables:%d", (int32_t) taosArrayGetSize(res)); }