diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index fa8870835c5fc6b914663a2d76c9202e1410e52f..eb383df48d1780fe203cc84453e9a6887c77210d 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -88,6 +88,10 @@ void getLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo, int64_t *blocks, double } void *destroyLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo) { + if (pLoadInfo == NULL) { + return NULL; + } + for (int32_t i = 0; i < pLoadInfo->numOfStt; ++i) { pLoadInfo[i].currentLoadBlockIndex = 1; pLoadInfo[i].blockIndex[0] = -1;