diff --git a/source/libs/catalog/src/ctgUtil.c b/source/libs/catalog/src/ctgUtil.c index 62896e43072ec9f1cd19e7561be6d420c5e7b12a..4a5ddbac3416b6a9b8479e36c8038441b6685e69 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;