fix:memory leak

This commit is contained in:
wangmm0220 2024-06-02 21:28:53 +08:00
parent ad075ef1de
commit a096e2c071
1 changed files with 6 additions and 2 deletions

View File

@ -662,8 +662,12 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
SMqConsumerObj *pConsumerNew = NULL;
STrans *pTrans = NULL;
if(mndAcquireConsumer(pMnode, subscribe.consumerId) == NULL && taosArrayGetSize(subscribe.topicNames) == 0){
goto _over;
if(taosArrayGetSize(subscribe.topicNames) == 0){
SMqConsumerObj *pConsumerTmp = mndAcquireConsumer(pMnode, subscribe.consumerId);
if(pConsumerTmp == NULL){
goto _over;
}
mndReleaseConsumer(pMnode, pConsumerTmp);
}
code = checkAndSortTopic(pMnode, subscribe.topicNames);