avoid null pointer

This commit is contained in:
yihaoDeng 2022-12-06 13:42:59 +08:00
parent 4e87bcc97a
commit 0254e90ce6
1 changed files with 2 additions and 1 deletions

View File

@ -887,7 +887,8 @@ void cliConnCb(uv_connect_t* req, int status) {
pConn->port, uv_strerror(status));
SCliMsg* pMsg = transQueueGet(&pConn->cliMsgs, 0);
STrans* pTransInst = pThrd->pTransInst;
if (REQUEST_NO_RESP(&pMsg->msg) && (pTransInst->failFastFp != NULL && pTransInst->failFastFp(pMsg->msg.msgType))) {
if (pMsg != NULL && REQUEST_NO_RESP(&pMsg->msg) &&
(pTransInst->failFastFp != NULL && pTransInst->failFastFp(pMsg->msg.msgType))) {
char* ip = pConn->ip;
uint32_t port = pConn->port;
char key[TSDB_FQDN_LEN + 64] = {0};