Merge pull request #27755 from taosdata/fix/TD-31971-3.0

fix(query)[TD-31971]. Fix potential wild pointer access in tsdbReaderClose
This commit is contained in:
Pan Wei 2024-09-10 08:52:09 +08:00 committed by GitHub
commit 99f320b7e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -4580,6 +4580,8 @@ int32_t tsdbSetTableList2(STsdbReader* pReader, const void* pTableList, int32_t
clearBlockScanInfo(*p);
}
tSimpleHashClear(pReader->status.pTableMap);
if (size < num) {
code = ensureBlockScanInfoBuf(&pReader->blockInfoBuf, num);
if (code) {
@ -4596,7 +4598,6 @@ int32_t tsdbSetTableList2(STsdbReader* pReader, const void* pTableList, int32_t
pReader->status.uidList.tableUidList = (uint64_t*)p1;
}
tSimpleHashClear(pReader->status.pTableMap);
STableUidList* pUidList = &pReader->status.uidList;
pUidList->currentIndex = 0;