fix: memory leak while dnode exiting

This commit is contained in:
Shengliang Guan 2022-07-14 10:41:22 +08:00
parent 5b1cb74c99
commit 59062a9bae
1 changed files with 6 additions and 1 deletions

View File

@ -168,7 +168,12 @@ int32_t mmPutMsgToQueue(SMnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) {
memcpy(pMsg, pRpc, sizeof(SRpcMsg));
dTrace("msg:%p, is created and will put into %s queue, type:%s", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType));
return mmPutMsgToWorker(pMgmt, pWorker, pMsg);
int32_t code = mmPutMsgToWorker(pMgmt, pWorker, pMsg);
if (code != 0) {
dTrace("msg:%p, is freed", pMsg);
taosFreeQitem(pMsg);
}
return code;
}
int32_t mmStartWorker(SMnodeMgmt *pMgmt) {