fix: fix insert memory leak
This commit is contained in:
parent
4fd0bc409d
commit
2c2d5c16ed
|
@ -414,6 +414,9 @@ int32_t hbGetQueryBasicInfo(SClientHbKey *connKey, SClientHbReq *req) {
|
|||
int32_t code = hbBuildQueryDesc(hbBasic, pTscObj);
|
||||
if (code) {
|
||||
releaseTscObj(connKey->tscRid);
|
||||
if (hbBasic->queryDesc) {
|
||||
taosArrayDestroyEx(hbBasic->queryDesc, tFreeClientHbQueryDesc);
|
||||
}
|
||||
taosMemoryFree(hbBasic);
|
||||
return code;
|
||||
}
|
||||
|
|
|
@ -1420,9 +1420,7 @@ static int32_t parseDataFromFile(SInsertParseContext* pCxt, SToken filePath, STa
|
|||
}
|
||||
|
||||
static void destroyInsertParseContextForTable(SInsertParseContext* pCxt) {
|
||||
if (!pCxt->pComCxt->async) {
|
||||
taosMemoryFreeClear(pCxt->pTableMeta);
|
||||
}
|
||||
taosMemoryFreeClear(pCxt->pTableMeta);
|
||||
destroyBoundColumnInfo(&pCxt->tags);
|
||||
tdDestroySVCreateTbReq(&pCxt->createTblReq);
|
||||
}
|
||||
|
|
|
@ -1124,7 +1124,7 @@ int32_t getTableMetaFromCacheForInsert(SArray* pTableMetaPos, SParseMetaCache* p
|
|||
int32_t reqIndex = *(int32_t*)taosArrayGet(pTableMetaPos, tableNo);
|
||||
SMetaRes* pRes = taosArrayGet(pMetaCache->pTableMetaData, reqIndex);
|
||||
if (TSDB_CODE_SUCCESS == pRes->code) {
|
||||
*pMeta = pRes->pRes;
|
||||
*pMeta = tableMetaDup(pRes->pRes);
|
||||
if (NULL == *pMeta) {
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue