diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c index a15d19fbe19ee20db9c178c4fa18e1a1c2fbc956..612e465295fafa0843a941fe7c1fe73c3002fb3d 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; }