diff options
author | Matt Stancliff <matt@genges.com> | 2015-01-14 11:31:17 -0500 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-22 10:35:32 +0100 |
commit | 97ffeb7c091bb5a2195473fdff5a65606666b14e (patch) | |
tree | 08a94d8522f37d8a88a72b7607b3dd3c5a105534 | |
parent | 4a36350d9f97dd579f44820724aabfc56e88a57a (diff) | |
download | redis-97ffeb7c091bb5a2195473fdff5a65606666b14e.tar.gz |
Fix cluster reset memory leak
[maybe] Fixes valgrind errors:
32 bytes in 4 blocks are definitely lost in loss record 107 of 228
at 0x80EA447: je_malloc (jemalloc.c:944)
by 0x806E59C: zrealloc (zmalloc.c:125)
by 0x80A9AFC: clusterSetMaster (cluster.c:801)
by 0x80AEDC9: clusterCommand (cluster.c:3994)
by 0x80682A5: call (redis.c:2049)
by 0x8068A20: processCommand (redis.c:2309)
by 0x8076497: processInputBuffer (networking.c:1143)
by 0x8073BAF: readQueryFromClient (networking.c:1208)
by 0x8060E98: aeProcessEvents (ae.c:412)
by 0x806123B: aeMain (ae.c:455)
by 0x806C3DB: main (redis.c:3832)
64 bytes in 8 blocks are definitely lost in loss record 143 of 228
at 0x80EA447: je_malloc (jemalloc.c:944)
by 0x806E59C: zrealloc (zmalloc.c:125)
by 0x80AAB40: clusterProcessPacket (cluster.c:801)
by 0x80A847F: clusterReadHandler (cluster.c:1975)
by 0x30000FF: ???
80 bytes in 10 blocks are definitely lost in loss record 148 of 228
at 0x80EA447: je_malloc (jemalloc.c:944)
by 0x806E59C: zrealloc (zmalloc.c:125)
by 0x80AAB40: clusterProcessPacket (cluster.c:801)
by 0x80A847F: clusterReadHandler (cluster.c:1975)
by 0x2FFFFFF: ???
-rw-r--r-- | src/cluster.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cluster.c b/src/cluster.c index 187fdfd85..54663c492 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -842,6 +842,7 @@ void freeClusterNode(clusterNode *n) { /* Release link and associated data structures. */ if (n->link) freeClusterLink(n->link); listRelease(n->fail_reports); + zfree(n->slaves); zfree(n); } |