From fb82b61d2fd5f7c48916f056faa5aed1fa79cb41 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 28 Jun 2023 10:35:38 +0800 Subject: [PATCH] fix:pSub is null --- source/dnode/mnode/impl/src/mndConsumer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 5f906e80cd..4395446e81 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -646,8 +646,9 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) { int32_t newTopicNum = taosArrayGetSize(pTopicList); for(int i = 0; i < newTopicNum; i++){ SMqSubscribeObj *pSub = mndAcquireSubscribe(pMnode, (const char*)cgroup, (const char*)taosArrayGetP(pTopicList, i)); + if(pSub == NULL) continue; taosRLockLatch(&pSub->lock); - if(pSub != NULL && taosHashGetSize(pSub->consumerHash) > MND_MAX_GROUP_PER_TOPIC){ + if(taosHashGetSize(pSub->consumerHash) > MND_MAX_GROUP_PER_TOPIC){ terrno = TSDB_CODE_TMQ_GROUP_OUT_OF_RANGE; code = terrno; taosRUnLockLatch(&pSub->lock); -- GitLab