Merge pull request #27373 from taosdata/fix/TD-31590

fix(tsdb/cache): check array init's retval
This commit is contained in:
Hongze Cheng 2024-08-22 10:45:20 +08:00 committed by GitHub
commit e226b51fc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -2368,6 +2368,9 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie
if (!state->pIndexList) {
state->pIndexList = taosArrayInit(1, sizeof(SBrinBlk));
if (!state->pIndexList) {
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, &lino, _err);
}
} else {
taosArrayClear(state->pIndexList);
}