fix:pSub is null

This commit is contained in:
wangmm0220 2023-06-28 10:35:38 +08:00
parent d34dc1242f
commit fb82b61d2f
1 changed files with 2 additions and 1 deletions

View File

@ -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);