fix: memory leak
This commit is contained in:
parent
efe7b5c3e2
commit
22372ad1e0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue