fix mem leak

This commit is contained in:
Yihao Deng 2024-02-20 03:59:34 +00:00
parent ffedfbaf1e
commit a36824c4a9
1 changed files with 4 additions and 0 deletions

View File

@ -961,6 +961,10 @@ static void cliSendCb(uv_write_t* req, int status) {
tTrace("%s conn %p send cost:%dus ", CONN_GET_INST_LABEL(pConn), pConn, (int)cost); tTrace("%s conn %p send cost:%dus ", CONN_GET_INST_LABEL(pConn), pConn, (int)cost);
} }
} }
if (pMsg->msg.contLen == 0 && pMsg->msg.pCont != 0) {
rpcFreeCont(pMsg->msg.pCont);
pMsg->msg.pCont = 0;
}
if (status == 0) { if (status == 0) {
tDebug("%s conn %p data already was written out", CONN_GET_INST_LABEL(pConn), pConn); tDebug("%s conn %p data already was written out", CONN_GET_INST_LABEL(pConn), pConn);