fix mem leak

This commit is contained in:
yihaoDeng 2023-11-15 10:04:29 +08:00
parent cfa7c19dd5
commit 5fccaf62b5
1 changed files with 5 additions and 2 deletions

View File

@ -159,7 +159,7 @@ static void uvStartSendResp(SSvrMsg* msg);
static void uvNotifyLinkBrokenToApp(SSvrConn* conn);
static FORCE_INLINE void destroySmsg(SSvrMsg* smsg);
static FORCE_INLINE void destroySmsg(SSvrMsg* smsg);
static FORCE_INLINE SSvrConn* createConn(void* hThrd);
static FORCE_INLINE void destroyConn(SSvrConn* conn, bool clear /*clear handle or not*/);
static FORCE_INLINE void destroyConnRegArg(SSvrConn* conn);
@ -1498,8 +1498,11 @@ int transSendResponse(const STransMsg* msg) {
return 0;
}
SExHandle* exh = msg->info.handle;
if (exh == NULL) {
return 0;
rpcFreeCont(msg->pCont);
tTrace("msg handle already released");
return -1;
}
int64_t refId = msg->info.refId;
ASYNC_CHECK_HANDLE(exh, refId);