From 6cabe5847e1a6f922cf657195c3666db9e2158c4 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Wed, 10 Aug 2022 11:26:23 +0800 Subject: [PATCH] fix(sync): delete memory after optimized --- source/libs/sync/src/syncReplication.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncReplication.c b/source/libs/sync/src/syncReplication.c index 29370fd4a5..24f75de5d3 100644 --- a/source/libs/sync/src/syncReplication.c +++ b/source/libs/sync/src/syncReplication.c @@ -199,7 +199,6 @@ int32_t syncNodeAppendEntriesPeersSnapshot2(SSyncNode* pSyncNode) { // send msg syncNodeAppendEntriesBatch(pSyncNode, pDestId, pMsg); - syncAppendEntriesBatchDestroy(pMsg); // speed up if (pMsg->dataCount > 0 && pSyncNode->commitIndex - pMsg->prevLogIndex > SYNC_SLOW_DOWN_RANGE) { @@ -216,6 +215,8 @@ int32_t syncNodeAppendEntriesPeersSnapshot2(SSyncNode* pSyncNode) { } while (0); #endif } + + syncAppendEntriesBatchDestroy(pMsg); } return ret; -- GitLab