fix: null pointer check when clearing tsdb reader

This commit is contained in:
kailixu 2024-08-12 15:51:00 +08:00
parent 4a98782a38
commit 7e57747bee
1 changed files with 7 additions and 5 deletions

View File

@ -4608,11 +4608,13 @@ static void freeSchemaFunc(void* param) {
}
static void clearSharedPtr(STsdbReader* p) {
p->status.pTableMap = NULL;
p->status.uidList.tableUidList = NULL;
p->info.pSchema = NULL;
p->pReadSnap = NULL;
p->pSchemaMap = NULL;
if (p) {
p->status.pTableMap = NULL;
p->status.uidList.tableUidList = NULL;
p->info.pSchema = NULL;
p->pReadSnap = NULL;
p->pSchemaMap = NULL;
}
}
static int32_t setSharedPtr(STsdbReader* pDst, const STsdbReader* pSrc) {