[sheepdog] [PATCH RFC] sheep: free memory used for exceptional nodes
Hitoshi Mitake
mitake.hitoshi at gmail.com
Mon May 6 16:46:04 CEST 2013
It seems that current clear_exceptional_node_lists() leaks memory used
for representing delayed and failed nodes.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/group.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index bb5d703..d335807 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -452,10 +452,14 @@ static void clear_exceptional_node_lists(void)
{
struct node *n, *t;
- list_for_each_entry_safe(n, t, &sys->failed_nodes, list)
+ list_for_each_entry_safe(n, t, &sys->failed_nodes, list) {
list_del(&n->list);
- list_for_each_entry_safe(n, t, &sys->delayed_nodes, list)
+ free(n);
+ }
+ list_for_each_entry_safe(n, t, &sys->delayed_nodes, list) {
list_del(&n->list);
+ free(n);
+ }
}
int epoch_log_read_remote(uint32_t epoch, struct sd_node *nodes, int len,
--
1.7.5.1
More information about the sheepdog
mailing list