From 70747ad1bbdc463c28a4c7068bcea78654b44385 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Thu, 21 May 2020 02:43:48 +0000 Subject: [PATCH] free is not right --- src/rpc/src/rpcMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index dcbfbcf9ac..99905d4ed3 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -889,12 +889,12 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) { rpcSendErrorMsgToPeer(pRecv, code); tTrace("%s %p %p, %s is sent with error code:%x", pRpc->label, pConn, (void *)pHead->ahandle, taosMsg[pHead->msgType+1], code); } - } else { // parsing OK + } else { // msg is passed to app only parsing is ok rpcProcessIncomingMsg(pConn, pHead); } } - if (code) rpcFreeMsg(pRecv->msg); + if (code) tfree(pRecv->msg); // parsing failed, msg shall be freed return pConn; } -- GitLab