From b277748662879e2ab0b257370207a7ca21f1190e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 6 Sep 2022 20:09:12 +0800 Subject: [PATCH] fix mem leak --- source/libs/transport/src/transCli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index ab1fcc31dc..dc2d937c49 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -430,12 +430,12 @@ void cliHandleExceptImpl(SCliConn* pConn, int32_t code) { if (pCtx == NULL || pCtx->pSem == NULL) { if (transMsg.info.ahandle == NULL) { - destroyCmsg(pMsg); + if (REQUEST_NO_RESP(&pMsg->msg)) destroyCmsg(pMsg); once = true; continue; } } - if (!REQUEST_NO_RESP(&pMsg->msg) && cliAppCb(pConn, &transMsg, pMsg) != 0) { + if (cliAppCb(pConn, &transMsg, pMsg) != 0) { return; } destroyCmsg(pMsg);