From 688a85c9c3076bee5ab148aad6e31592fd944afd Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 28 Jan 2022 18:14:38 +0800 Subject: [PATCH] fix mem leak --- source/dnode/mnode/impl/src/mndSubscribe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c index fa8c78f4b1..62083a3d03 100644 --- a/source/dnode/mnode/impl/src/mndSubscribe.c +++ b/source/dnode/mnode/impl/src/mndSubscribe.c @@ -122,7 +122,7 @@ static int32_t mndProcessGetSubEpReq(SMnodeMsg *pMsg) { if (changed || found) { SSdbRaw *pRaw = mndSubActionEncode(pSub); sdbSetRawStatus(pRaw, SDB_STATUS_READY); - sdbWriteNotFree(pMnode->pSdb, pRaw); + sdbWrite(pMnode->pSdb, pRaw); } mndReleaseSubscribe(pMnode, pSub); } @@ -434,6 +434,7 @@ SUB_DECODE_OVER: if (terrno != TSDB_CODE_SUCCESS) { mError("subscribe:%s, failed to decode from raw:%p since %s", pSub->key, pRaw, terrstr()); // TODO free subscribeobj + tfree(buf); tfree(pRow); return NULL; }