fix(tsdb): add null ptr check.
This commit is contained in:
parent
4ce1614045
commit
4a7698d4ab
|
@ -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) {
|
||||||
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) {
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue