fix(tsdb/cache): check array init's retval
This commit is contained in:
parent
9b76e216a7
commit
59e2849756
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue