From e72ddf942942ff4ce7fec3a33e0c5b929258d3ee Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 13 Mar 2024 05:56:13 +0000 Subject: [PATCH 1/2] fix double free --- source/dnode/mnode/impl/src/mndIndex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/mnode/impl/src/mndIndex.c b/source/dnode/mnode/impl/src/mndIndex.c index 622ed0080f..43d13ae602 100644 --- a/source/dnode/mnode/impl/src/mndIndex.c +++ b/source/dnode/mnode/impl/src/mndIndex.c @@ -596,6 +596,9 @@ static int32_t mndSetUpdateIdxStbCommitLogs(SMnode *pMnode, STrans *pTrans, SStb memcpy(pNew, pOld, sizeof(SStbObj)); taosRUnLockLatch(&pOld->lock); + pNew->pTags = NULL; + pNew->pColumns = NULL; + pNew->pTags = NULL; pNew->updateTime = taosGetTimestampMs(); pNew->lock = 0; From e9b0c877b073f40c388f9ff2cfeabec614ff0192 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 13 Mar 2024 06:01:16 +0000 Subject: [PATCH 2/2] fix double free --- source/dnode/mnode/impl/src/mndIndex.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndIndex.c b/source/dnode/mnode/impl/src/mndIndex.c index 43d13ae602..f2e2c556cf 100644 --- a/source/dnode/mnode/impl/src/mndIndex.c +++ b/source/dnode/mnode/impl/src/mndIndex.c @@ -598,8 +598,6 @@ static int32_t mndSetUpdateIdxStbCommitLogs(SMnode *pMnode, STrans *pTrans, SStb pNew->pTags = NULL; pNew->pColumns = NULL; - - pNew->pTags = NULL; pNew->updateTime = taosGetTimestampMs(); pNew->lock = 0;