From 22372ad1e001f4076d007253214c9b779b4205dd Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Sat, 26 Nov 2022 16:05:26 +0800 Subject: [PATCH] fix: memory leak --- source/dnode/vnode/src/tq/tqMeta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c index a15d19fbe1..612e465295 100644 --- a/source/dnode/vnode/src/tq/tqMeta.c +++ b/source/dnode/vnode/src/tq/tqMeta.c @@ -291,6 +291,7 @@ int32_t tqMetaRestoreHandle(STQ* pTq) { STqHandle handle; tDecoderInit(&decoder, (uint8_t*)pVal, vLen); tDecodeSTqHandle(&decoder, &handle); + tDecoderClear(&decoder); handle.pRef = walOpenRef(pTq->pVnode->pWal); if (handle.pRef == NULL) { @@ -345,6 +346,8 @@ int32_t tqMetaRestoreHandle(STQ* pTq) { taosHashPut(pTq->pHandle, pKey, kLen, &handle, sizeof(STqHandle)); } + tdbFree(pKey); + tdbFree(pVal); tdbTbcClose(pCur); return 0; }