free message is not in right way

This commit is contained in:
Jeff Tao 2020-05-21 04:56:48 +00:00
parent 70747ad1bb
commit 7d0abd1d4e
1 changed files with 2 additions and 2 deletions

View File

@ -869,7 +869,7 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) {
if (pRecv->ip==0 && pConn) {
rpcProcessBrokenLink(pConn);
tfree(pRecv->msg);
rpcFreeMsg(pRecv->msg);
return NULL;
}
@ -894,7 +894,7 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) {
}
}
if (code) tfree(pRecv->msg); // parsing failed, msg shall be freed
if (code) rpcFreeMsg(pRecv->msg); // parsing failed, msg shall be freed
return pConn;
}