fix(query): fix memory leak.
This commit is contained in:
parent
bca5fc7893
commit
16fe48f770
|
@ -3380,12 +3380,14 @@ static int32_t initForFirstBlockInFile(STsdbReader* pReader, SDataBlockIter* pBl
|
||||||
|
|
||||||
int32_t code = moveToNextFile(pReader, &num, pTableList);
|
int32_t code = moveToNextFile(pReader, &num, pTableList);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
taosArrayDestroy(pTableList);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
// all data files are consumed, try data in buffer
|
// all data files are consumed, try data in buffer
|
||||||
if (num.numOfBlocks + num.numOfLastFiles == 0) {
|
if (num.numOfBlocks + num.numOfLastFiles == 0) {
|
||||||
pReader->status.loadFromFile = false;
|
pReader->status.loadFromFile = false;
|
||||||
|
taosArrayDestroy(pTableList);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3400,6 +3402,7 @@ static int32_t initForFirstBlockInFile(STsdbReader* pReader, SDataBlockIter* pBl
|
||||||
|
|
||||||
// set the correct start position according to the query time window
|
// set the correct start position according to the query time window
|
||||||
initBlockDumpInfo(pReader, pBlockIter);
|
initBlockDumpInfo(pReader, pBlockIter);
|
||||||
|
taosArrayDestroy(pTableList);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue