From da72fca693a643e54cb90a97b2180cb06c3bea12 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 22 Aug 2024 10:03:09 +0800 Subject: [PATCH] fix: local policy memory leak --- source/client/src/clientImpl.c | 1 + source/libs/executor/src/exchangeoperator.c | 1 + 2 files changed, 2 insertions(+) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 563d70ab08..11b053df26 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1792,6 +1792,7 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { AsyncArg* arg = taosMemoryCalloc(1, sizeof(AsyncArg)); if (NULL == arg) { pMsg->code = TSDB_CODE_OUT_OF_MEMORY; + taosMemoryFree(tEpSet); rpcFreeCont(pMsg->pCont); destroySendMsgInfo(pMsg->info.ahandle); return; diff --git a/source/libs/executor/src/exchangeoperator.c b/source/libs/executor/src/exchangeoperator.c index 60faba3e3a..d90f59047d 100644 --- a/source/libs/executor/src/exchangeoperator.c +++ b/source/libs/executor/src/exchangeoperator.c @@ -521,6 +521,7 @@ void doDestroyExchangeOperatorInfo(void* param) { int32_t loadRemoteDataCallback(void* param, SDataBuf* pMsg, int32_t code) { SFetchRspHandleWrapper* pWrapper = (SFetchRspHandleWrapper*)param; + taosMemoryFreeClear(pMsg->pEpSet); SExchangeInfo* pExchangeInfo = taosAcquireRef(exchangeObjRefPool, pWrapper->exchangeId); if (pExchangeInfo == NULL) { qWarn("failed to acquire exchange operator, since it may have been released, %p", pExchangeInfo);