enh: memory leak issue
This commit is contained in:
parent
7471b9506d
commit
33047e7d7f
|
@ -2027,10 +2027,6 @@ static int32_t ctgHandleGetTbNamesRsp(SCtgTaskReq* tReq, int32_t reqType, const
|
|||
CTG_ERR_JRET(CTG_ERR_CODE_TABLE_NOT_EXIST);
|
||||
}
|
||||
|
||||
if (CTG_FLAG_IS_STB(flag)) {
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -2050,9 +2046,14 @@ static int32_t ctgHandleGetTbNamesRsp(SCtgTaskReq* tReq, int32_t reqType, const
|
|||
CTG_ERR_JRET(TSDB_CODE_CTG_INTERNAL_ERROR);
|
||||
}
|
||||
|
||||
pRes->code = 0;
|
||||
pRes->pRes = pOut->tbMeta;
|
||||
pOut->tbMeta = NULL;
|
||||
if (!pRes->pRes) {
|
||||
pRes->code = 0;
|
||||
pRes->pRes = pOut->tbMeta;
|
||||
pOut->tbMeta = NULL;
|
||||
} else {
|
||||
taosMemoryFreeClear(pOut->tbMeta);
|
||||
}
|
||||
|
||||
if (0 == atomic_sub_fetch_32(&ctx->fetchNum, 1)) {
|
||||
TSWAP(pTask->res, ctx->pResList);
|
||||
taskDone = true;
|
||||
|
|
|
@ -14572,6 +14572,7 @@ static int32_t rewriteDropTable(STranslateContext* pCxt, SQuery* pQuery) {
|
|||
return code;
|
||||
}
|
||||
if (tableType == TSDB_SUPER_TABLE && LIST_LENGTH(pStmt->pTables) > 1) {
|
||||
taosHashCleanup(pVgroupHashmap);
|
||||
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DROP_STABLE);
|
||||
}
|
||||
if (pCxt->withOpt) continue;
|
||||
|
|
Loading…
Reference in New Issue