diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 5b8f059e04ff1745ad0dba18297025d6431cf19e..275048e94a6517e0c8381e368d7b381e15a8f448 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -445,9 +445,11 @@ void cliHandleExceptImpl(SCliConn* pConn, int32_t code) { if (pCtx == NULL || pCtx->pSem == NULL) { if (transMsg.info.ahandle == NULL) { - if (pMsg == NULL || REQUEST_NO_RESP(&pMsg->msg) || pMsg->type == Release) destroyCmsg(pMsg); - once = true; - continue; + if (pMsg == NULL || REQUEST_NO_RESP(&pMsg->msg) || pMsg->type == Release) { + destroyCmsg(pMsg); + once = true; + continue; + } } } @@ -1217,6 +1219,7 @@ static FORCE_INLINE void destroyCmsg(void* arg) { if (pMsg == NULL) { return; } + transDestroyConnCtx(pMsg->ctx); destroyUserdata(&pMsg->msg); taosMemoryFree(pMsg);