diff --git a/src/mnode/src/mnodeRead.c b/src/mnode/src/mnodeRead.c index 200f589b7866d3fa6cf9865be397935657d7ba86..dadd8155d8648244dba762afec63bfc6f2ac3721 100644 --- a/src/mnode/src/mnodeRead.c +++ b/src/mnode/src/mnodeRead.c @@ -50,6 +50,9 @@ int32_t mnodeProcessRead(SMnodeMsg *pMsg) { if (!sdbIsMaster()) { SMnodeRsp *rpcRsp = &pMsg->rpcRsp; SRpcEpSet *epSet = rpcMallocCont(sizeof(SRpcEpSet)); + if (!epSet) { + return TSDB_CODE_MND_OUT_OF_MEMORY; + } mnodeGetMnodeEpSetForShell(epSet, true); rpcRsp->rsp = epSet; rpcRsp->len = sizeof(SRpcEpSet);