提交 5ad1bca6 编写于 作者: M Minglei Jin

fix: free value return by tdb

上级 be6ff9a4
...@@ -179,6 +179,7 @@ int32_t tqMetaRestoreCheckInfo(STQ* pTq) { ...@@ -179,6 +179,7 @@ int32_t tqMetaRestoreCheckInfo(STQ* pTq) {
if (tDecodeSTqCheckInfo(&decoder, &info) < 0) { if (tDecodeSTqCheckInfo(&decoder, &info) < 0) {
terrno = TSDB_CODE_OUT_OF_MEMORY; terrno = TSDB_CODE_OUT_OF_MEMORY;
tdbFree(pKey); tdbFree(pKey);
tdbFree(pVal);
tdbTbcClose(pCur); tdbTbcClose(pCur);
return -1; return -1;
} }
...@@ -186,11 +187,13 @@ int32_t tqMetaRestoreCheckInfo(STQ* pTq) { ...@@ -186,11 +187,13 @@ int32_t tqMetaRestoreCheckInfo(STQ* pTq) {
if (taosHashPut(pTq->pCheckInfo, info.topic, strlen(info.topic), &info, sizeof(STqCheckInfo)) < 0) { if (taosHashPut(pTq->pCheckInfo, info.topic, strlen(info.topic), &info, sizeof(STqCheckInfo)) < 0) {
terrno = TSDB_CODE_OUT_OF_MEMORY; terrno = TSDB_CODE_OUT_OF_MEMORY;
tdbFree(pKey); tdbFree(pKey);
tdbFree(pVal);
tdbTbcClose(pCur); tdbTbcClose(pCur);
return -1; return -1;
} }
} }
tdbFree(pKey); 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.
先完成此消息的编辑!
想要评论请 注册