fix(query): release lru handle before returning from block idx loading

This commit is contained in:
Minglei Jin 2023-02-06 14:41:17 +08:00
parent a6d52aed4f
commit b83f93d564
1 changed files with 2 additions and 1 deletions

View File

@ -660,7 +660,8 @@ static int32_t doLoadBlockIndex(STsdbReader* pReader, SDataFReader* pFileReader,
SArray* aBlockIdx = (SArray*)taosLRUCacheValue(pFileReader->pTsdb->biCache, handle);
size_t num = taosArrayGetSize(aBlockIdx);
if (num == 0) {
taosArrayDestroy(aBlockIdx);
tsdbBICacheRelease(pFileReader->pTsdb->biCache, handle);
// taosArrayDestroy(aBlockIdx);
return TSDB_CODE_SUCCESS;
}