tsdb/cache: pLastIter null pointer check

This commit is contained in:
Minglei Jin 2023-07-24 11:03:07 +08:00
parent 5f25d70fc2
commit 968cfd9e65
1 changed files with 6 additions and 2 deletions

View File

@ -2053,7 +2053,9 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie
}
if (!state->pLastRow) {
lastIterClose(&state->pLastIter);
if (state->pLastIter) {
lastIterClose(&state->pLastIter);
}
clearLastFileSet(state);
state->state = SFSNEXTROW_FILESET;
@ -2154,7 +2156,9 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow, bool *pIgnoreEarlie
}
if (!state->pLastRow) {
lastIterClose(&state->pLastIter);
if (state->pLastIter) {
lastIterClose(&state->pLastIter);
}
*ppRow = &state->row;
--state->iRow;