From 03c53c9531e684efe1802926d37764988ce05758 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 16 Dec 2022 22:37:24 +0800 Subject: [PATCH] fix mem leak --- source/client/src/clientTmq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 74f05056c6..c63ddea25d 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1172,6 +1172,8 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { if (code != 0) { tscWarn("msg discard from vgId:%d, epoch %d, since %s", vgId, epoch, terrstr()); if (pMsg->pData) taosMemoryFree(pMsg->pData); + if (pMsg->pEpSet) taosMemoryFree(pMsg->pEpSet); + if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); goto CREATE_MSG_FAIL;