Merge pull request #24817 from taosdata/fix/fixInvalidRead30

fix invalid read
This commit is contained in:
Alex Duan 2024-02-21 20:28:56 +08:00 committed by GitHub
commit fd85d303c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -961,7 +961,7 @@ 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) { if (pMsg != NULL && pMsg->msg.contLen == 0 && pMsg->msg.pCont != 0) {
rpcFreeCont(pMsg->msg.pCont); rpcFreeCont(pMsg->msg.pCont);
pMsg->msg.pCont = 0; pMsg->msg.pCont = 0;
} }