Merge pull request #16282 from taosdata/fix/TD-18456
fix: fix memory leak issue
This commit is contained in:
commit
a94e7a5281
|
@ -238,6 +238,9 @@ int32_t parseSql(SRequestObj* pRequest, bool topicQuery, SQuery** pQuery, SStmtC
|
||||||
TSWAP(pRequest->targetTableList, (*pQuery)->pTargetTableList);
|
TSWAP(pRequest->targetTableList, (*pQuery)->pTargetTableList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
taosArrayDestroy(cxt.pTableMetaPos);
|
||||||
|
taosArrayDestroy(cxt.pTableVgroupPos);
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -674,6 +674,8 @@ static void destorySqlParseWrapper(SqlParseWrapper *pWrapper) {
|
||||||
taosArrayDestroy(pWrapper->catalogReq.pIndex);
|
taosArrayDestroy(pWrapper->catalogReq.pIndex);
|
||||||
taosArrayDestroy(pWrapper->catalogReq.pUser);
|
taosArrayDestroy(pWrapper->catalogReq.pUser);
|
||||||
taosArrayDestroy(pWrapper->catalogReq.pTableIndex);
|
taosArrayDestroy(pWrapper->catalogReq.pTableIndex);
|
||||||
|
taosArrayDestroy(pWrapper->pCtx->pTableMetaPos);
|
||||||
|
taosArrayDestroy(pWrapper->pCtx->pTableVgroupPos);
|
||||||
taosMemoryFree(pWrapper->pCtx);
|
taosMemoryFree(pWrapper->pCtx);
|
||||||
taosMemoryFree(pWrapper);
|
taosMemoryFree(pWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -893,7 +893,7 @@ int32_t catalogChkTbMetaVersion(SCatalog* pCtg, SRequestConnInfo *pConn, SArray*
|
||||||
CTG_API_LEAVE(TSDB_CODE_CTG_INVALID_INPUT);
|
CTG_API_LEAVE(TSDB_CODE_CTG_INVALID_INPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
SName name;
|
SName name = {0};
|
||||||
int32_t sver = 0;
|
int32_t sver = 0;
|
||||||
int32_t tver = 0;
|
int32_t tver = 0;
|
||||||
int32_t tbNum = taosArrayGetSize(pTables);
|
int32_t tbNum = taosArrayGetSize(pTables);
|
||||||
|
|
|
@ -1159,6 +1159,16 @@ void destoryParseMetaCache(SParseMetaCache* pMetaCache, bool request) {
|
||||||
taosHashCleanup(pMetaCache->pTableMeta);
|
taosHashCleanup(pMetaCache->pTableMeta);
|
||||||
taosHashCleanup(pMetaCache->pTableVgroup);
|
taosHashCleanup(pMetaCache->pTableVgroup);
|
||||||
}
|
}
|
||||||
|
SInsertTablesMetaReq* p = taosHashIterate(pMetaCache->pInsertTables, NULL);
|
||||||
|
while (NULL != p) {
|
||||||
|
taosArrayDestroy(p->pTableMetaPos);
|
||||||
|
taosArrayDestroy(p->pTableMetaReq);
|
||||||
|
taosArrayDestroy(p->pTableVgroupPos);
|
||||||
|
taosArrayDestroy(p->pTableVgroupReq);
|
||||||
|
|
||||||
|
p = taosHashIterate(pMetaCache->pInsertTables, p);
|
||||||
|
}
|
||||||
|
taosHashCleanup(pMetaCache->pInsertTables);
|
||||||
taosHashCleanup(pMetaCache->pDbVgroup);
|
taosHashCleanup(pMetaCache->pDbVgroup);
|
||||||
taosHashCleanup(pMetaCache->pDbCfg);
|
taosHashCleanup(pMetaCache->pDbCfg);
|
||||||
taosHashCleanup(pMetaCache->pDbInfo);
|
taosHashCleanup(pMetaCache->pDbInfo);
|
||||||
|
|
|
@ -149,13 +149,10 @@ int32_t qwExecTask(QW_FPARAMS_DEF, SQWTaskCtx *ctx, bool *queryStop) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_return:
|
||||||
|
|
||||||
taosArrayDestroy(pResList);
|
taosArrayDestroy(pResList);
|
||||||
QW_RET(code);
|
QW_RET(code);
|
||||||
|
|
||||||
_return:
|
|
||||||
taosArrayDestroy(pResList);
|
|
||||||
|
|
||||||
return code;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t qwGenerateSchHbRsp(SQWorker *mgmt, SQWSchStatus *sch, SQWHbInfo *hbInfo) {
|
int32_t qwGenerateSchHbRsp(SQWorker *mgmt, SQWSchStatus *sch, SQWHbInfo *hbInfo) {
|
||||||
|
|
Loading…
Reference in New Issue