Merge pull request #27251 from taosdata/fix/syntax

fix(tsdb): fix memory leak.
This commit is contained in:
Haojun Liao 2024-08-15 19:09:18 +08:00 committed by GitHub
commit 06af850e3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -337,13 +337,14 @@ int32_t createDataBlockScanInfo(STsdbReader* pTsdbReader, SBlockInfoBuf* pBuf, c
int64_t st = taosGetTimestampUs();
code = initBlockScanInfoBuf(pBuf, numOfTables);
if (code != TSDB_CODE_SUCCESS) {
tSimpleHashCleanup(pTableMap);
return code;
}
pUidList->tableUidList = taosMemoryMalloc(numOfTables * sizeof(uint64_t));
if (pUidList->tableUidList == NULL) {
tSimpleHashCleanup(pTableMap);
return TSDB_CODE_OUT_OF_MEMORY;
return terrno;
}
pUidList->currentIndex = 0;