From 9397bbe48a4bd18c5dceff6c0bc244dae011981b Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 22 Jul 2020 11:47:02 +0800 Subject: [PATCH] [TD-972] jump or move depends on uninitialised value --- src/mnode/src/mnodeShow.c | 4 ++-- src/mnode/src/mnodeUser.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mnode/src/mnodeShow.c b/src/mnode/src/mnodeShow.c index e3d5b41be3..1d85a8cacd 100644 --- a/src/mnode/src/mnodeShow.c +++ b/src/mnode/src/mnodeShow.c @@ -236,7 +236,7 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) { } SCMHeartBeatMsg *pHBMsg = pMsg->rpcMsg.pCont; - SRpcConnInfo connInfo; + SRpcConnInfo connInfo = {0}; rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo); int32_t connId = htonl(pHBMsg->connId); @@ -284,7 +284,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) { SCMConnectRsp *pConnectRsp = NULL; int32_t code = TSDB_CODE_SUCCESS; - SRpcConnInfo connInfo; + SRpcConnInfo connInfo = {0}; if (rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo) != 0) { mError("thandle:%p is already released while process connect msg", pMsg->rpcMsg.handle); code = TSDB_CODE_MND_INVALID_CONNECTION; diff --git a/src/mnode/src/mnodeUser.c b/src/mnode/src/mnodeUser.c index 84f5d6aa58..8c783eebaf 100644 --- a/src/mnode/src/mnodeUser.c +++ b/src/mnode/src/mnodeUser.c @@ -358,7 +358,7 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi } SUserObj *mnodeGetUserFromConn(void *pConn) { - SRpcConnInfo connInfo; + SRpcConnInfo connInfo = {0}; if (rpcGetConnInfo(pConn, &connInfo) == 0) { return mnodeGetUser(connInfo.user); } else { -- GitLab