fix(query)[TD-31791]: fix null pointer access after memory allocation failure

This commit is contained in:
Jinqing Kuang 2024-08-30 09:25:18 +08:00
parent c6d0831cd1
commit 9f7087ffbc
1 changed files with 1 additions and 0 deletions

View File

@ -2258,6 +2258,7 @@ static int32_t lastIterOpen(SFSLastIter *iter, STFileSet *pFileSet, STsdb *pTsdb
int32_t code = 0; int32_t code = 0;
destroySttBlockReader(pr->pLDataIterArray, NULL); destroySttBlockReader(pr->pLDataIterArray, NULL);
pr->pLDataIterArray = taosArrayInit(4, POINTER_BYTES); pr->pLDataIterArray = taosArrayInit(4, POINTER_BYTES);
if (pr->pLDataIterArray == NULL) return terrno;
SMergeTreeConf conf = { SMergeTreeConf conf = {
.uid = uid, .uid = uid,