fix(tsdb/cache): check array init's retval

This commit is contained in:
Minglei Jin 2024-08-21 18:37:17 +08:00
parent 9b76e216a7
commit 59e2849756
1 changed files with 12 additions and 10 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);
}
@ -2653,7 +2656,6 @@ static int32_t getNextRowFromMem(void *iter, TSDBROW **ppRow, bool *pIgnoreEarli
TAOS_RETURN(code);
}
default:
ASSERT(0);
break;
}