Skip to content

Commit 051a43e

Browse files
mattstaantirez
authored andcommitted
Fix cluster migrate memory leak
Fixes valgrind error: 48 bytes in 1 blocks are definitely lost in loss record 196 of 373 at 0x4910D3: je_malloc (jemalloc.c:944) by 0x42807D: zmalloc (zmalloc.c:125) by 0x41FA0D: dictGetIterator (dict.c:543) by 0x41FA48: dictGetSafeIterator (dict.c:555) by 0x459B73: clusterHandleSlaveMigration (cluster.c:2776) by 0x45BF27: clusterCron (cluster.c:3123) by 0x423344: serverCron (redis.c:1239) by 0x41D6CD: aeProcessEvents (ae.c:311) by 0x41D8EA: aeMain (ae.c:455) by 0x41A84B: main (redis.c:3832)
1 parent 2904950 commit 051a43e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cluster.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,7 @@ void clusterHandleSlaveMigration(int max_slaves) {
28032803
}
28042804
}
28052805
}
2806+
dictReleaseIterator(di);
28062807

28072808
/* Step 4: perform the migration if there is a target, and if I'm the
28082809
* candidate. */

0 commit comments

Comments
 (0)