Merge pull request #1978 from taosdata/hotfix/rpcFreeMsg

free is not right
This commit is contained in:
Shengliang Guan 2020-05-21 10:46:43 +08:00 committed by GitHub
commit 0ec68470f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}