From 74687496666300cb168de33d6350efce10799a2f Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 19 Jul 2023 10:48:04 +0800 Subject: [PATCH] memory leak --- source/libs/sync/src/syncMain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 1c27c4110f..039c039c72 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -3132,6 +3132,8 @@ int32_t syncNodeOnClientRequest(SSyncNode* ths, SRpcMsg* pMsg, SyncIndex* pRetIn int32_t code = syncNodeCheckChangeConfig(ths, pEntry); if(code < 0){ sError("vgId:%d, failed to check change config since %s.", ths->vgId, terrstr()); + syncEntryDestroy(pEntry); + pEntry = NULL; return -1; } @@ -3141,6 +3143,8 @@ int32_t syncNodeOnClientRequest(SSyncNode* ths, SRpcMsg* pMsg, SyncIndex* pRetIn if (rsp.info.handle != NULL) { tmsgSendRsp(&rsp); } + syncEntryDestroy(pEntry); + pEntry = NULL; return -1; } }