From 905df6f7ac9b233b973d343b3e7990d79eef9b2a Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 24 Apr 2023 10:37:58 +0800 Subject: [PATCH] fix: memory leak issue --- source/libs/catalog/src/ctgUtil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libs/catalog/src/ctgUtil.c b/source/libs/catalog/src/ctgUtil.c index 62896e4307..4a5ddbac34 100644 --- a/source/libs/catalog/src/ctgUtil.c +++ b/source/libs/catalog/src/ctgUtil.c @@ -1371,6 +1371,8 @@ int32_t ctgChkSetTbAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res) { tNameGetFullDbName(&req->pRawReq->tbName, dbFName); while (true) { + taosMemoryFreeClear(pMeta); + char* pCond = taosHashGet(pTbs, tbFName, strlen(tbFName)); if (pCond) { if (strlen(pCond) > 1) { @@ -1412,7 +1414,7 @@ int32_t ctgChkSetTbAuthRes(SCatalog* pCtg, SCtgAuthReq* req, SCtgAuthRsp* res) { if (req->onlyCache) { res->metaNotExists = true; ctgDebug("suid %" PRIu64 " name not in cache for auth", pMeta->suid); - return TSDB_CODE_SUCCESS; + goto _return; } continue; -- GitLab