Merge pull request #23701 from taosdata/fix/TD-26952

fix mem leak
This commit is contained in:
Haojun Liao 2023-11-21 10:46:56 +08:00 committed by GitHub
commit d9844fbf9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);