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

fix(tsdb): add null ptr check.

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