free pReqMsg if outType is not 0

This commit is contained in:
Jeff Tao 2020-07-06 23:31:07 +00:00
parent 0568c10c4e
commit 6b3d0a1838
1 changed files with 4 additions and 1 deletions

View File

@ -603,6 +603,9 @@ static void rpcReleaseConn(SRpcConn *pConn) {
rpcFreeMsg(pConn->pRspMsg); // it may have a response msg saved, but not request msg
pConn->pRspMsg = NULL;
if (pConn->pReqMsg) rpcFreeCont(pConn->pReqMsg);
} else {
if (pConn->outType && pConn->pReqMsg)
rpcFreeCont(pConn->pReqMsg);
}
// memset could not be used, since lockeBy can not be reset