From f35db3ba6cd4fa55f5885cb7ea191a50fd01e51d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 5 Jul 2023 17:36:55 +0800 Subject: [PATCH] fix(tsdb): add none check. --- source/dnode/vnode/src/tsdb/tsdbRead2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead2.c b/source/dnode/vnode/src/tsdb/tsdbRead2.c index 3503fbdba1..bf23c18cf6 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead2.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead2.c @@ -1079,6 +1079,10 @@ static int32_t doLoadFileBlock(STsdbReader* pReader, SArray* pIndexList, SBlockN continue; } + if (pScanInfo->pBlockList == NULL) { + pScanInfo->pBlockList = taosArrayInit(4, sizeof(SBrinRecord)); + } + void* p1 = taosArrayPush(pScanInfo->pBlockList, pRecord); if (p1 == NULL) { return TSDB_CODE_OUT_OF_MEMORY; -- GitLab