[TD-972] jump or move depends on uninitialised value
This commit is contained in:
parent
39ef14a68f
commit
9397bbe48a
|
@ -236,7 +236,7 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SCMHeartBeatMsg *pHBMsg = pMsg->rpcMsg.pCont;
|
SCMHeartBeatMsg *pHBMsg = pMsg->rpcMsg.pCont;
|
||||||
SRpcConnInfo connInfo;
|
SRpcConnInfo connInfo = {0};
|
||||||
rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo);
|
rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo);
|
||||||
|
|
||||||
int32_t connId = htonl(pHBMsg->connId);
|
int32_t connId = htonl(pHBMsg->connId);
|
||||||
|
@ -284,7 +284,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
|
||||||
SCMConnectRsp *pConnectRsp = NULL;
|
SCMConnectRsp *pConnectRsp = NULL;
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
SRpcConnInfo connInfo;
|
SRpcConnInfo connInfo = {0};
|
||||||
if (rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo) != 0) {
|
if (rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo) != 0) {
|
||||||
mError("thandle:%p is already released while process connect msg", pMsg->rpcMsg.handle);
|
mError("thandle:%p is already released while process connect msg", pMsg->rpcMsg.handle);
|
||||||
code = TSDB_CODE_MND_INVALID_CONNECTION;
|
code = TSDB_CODE_MND_INVALID_CONNECTION;
|
||||||
|
|
|
@ -358,7 +358,7 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi
|
||||||
}
|
}
|
||||||
|
|
||||||
SUserObj *mnodeGetUserFromConn(void *pConn) {
|
SUserObj *mnodeGetUserFromConn(void *pConn) {
|
||||||
SRpcConnInfo connInfo;
|
SRpcConnInfo connInfo = {0};
|
||||||
if (rpcGetConnInfo(pConn, &connInfo) == 0) {
|
if (rpcGetConnInfo(pConn, &connInfo) == 0) {
|
||||||
return mnodeGetUser(connInfo.user);
|
return mnodeGetUser(connInfo.user);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue