提交 4a7698d4 编写于 作者: H Haojun Liao

fix(tsdb): add null ptr check.

上级 4ce16140
......@@ -104,6 +104,10 @@ void *destroyLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo) {
}
void destroySttBlockReader(SLDataIter* pLDataIter, int32_t numOfIter) {
if (pLDataIter == NULL) {
return;
}
for(int32_t i = 0; i < numOfIter; ++i) {
tLDataIterClose2(&pLDataIter[i]);
}
......
......@@ -4791,6 +4791,7 @@ static void clearSharedPtr(STsdbReader* p) {
p->pReadSnap = NULL;
p->pSchema = NULL;
p->pSchemaMap = NULL;
p->pfSetArray = NULL;
}
static void setSharedPtr(STsdbReader* pDst, const STsdbReader* pSrc) {
......@@ -4800,6 +4801,7 @@ static void setSharedPtr(STsdbReader* pDst, const STsdbReader* pSrc) {
pDst->pSchema = pSrc->pSchema;
pDst->pSchemaMap = pSrc->pSchemaMap;
pDst->pReadSnap = pSrc->pReadSnap;
pDst->pfSetArray = pSrc->pfSetArray;
if (pDst->pSchema) {
tsdbRowMergerInit(&pDst->status.merger, pDst->pSchema);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册