提交 22372ad1 编写于 作者: L Liu Jicong

fix: memory leak

上级 efe7b5c3
...@@ -291,6 +291,7 @@ int32_t tqMetaRestoreHandle(STQ* pTq) { ...@@ -291,6 +291,7 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
STqHandle handle; STqHandle handle;
tDecoderInit(&decoder, (uint8_t*)pVal, vLen); tDecoderInit(&decoder, (uint8_t*)pVal, vLen);
tDecodeSTqHandle(&decoder, &handle); tDecodeSTqHandle(&decoder, &handle);
tDecoderClear(&decoder);
handle.pRef = walOpenRef(pTq->pVnode->pWal); handle.pRef = walOpenRef(pTq->pVnode->pWal);
if (handle.pRef == NULL) { if (handle.pRef == NULL) {
...@@ -345,6 +346,8 @@ int32_t tqMetaRestoreHandle(STQ* pTq) { ...@@ -345,6 +346,8 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
taosHashPut(pTq->pHandle, pKey, kLen, &handle, sizeof(STqHandle)); taosHashPut(pTq->pHandle, pKey, kLen, &handle, sizeof(STqHandle));
} }
tdbFree(pKey);
tdbFree(pVal);
tdbTbcClose(pCur); tdbTbcClose(pCur);
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册