From 2eb9861cbc0387b1054bfeb7864c255a42b475f5 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Sat, 9 Oct 2010 06:58:00 +0000 Subject: mgmt/Glusterd: Memory leak fixes, minor CLI changes Signed-off-by: Kaushik BV Signed-off-by: Vijay Bellur BUG: 1852 (Usage message of volume set printed twice) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1852 --- libglusterfs/src/xlator.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libglusterfs/src/xlator.c') diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index ff1dc5efa..b0f3eba4a 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -1205,6 +1205,9 @@ xlator_list_destroy (xlator_list_t *list) int xlator_destroy (xlator_t *xl) { + volume_opt_list_t *vol_opt = NULL; + volume_opt_list_t *tmp = NULL; + if (!xl) return 0; @@ -1221,6 +1224,11 @@ xlator_destroy (xlator_t *xl) xlator_list_destroy (xl->parents); + list_for_each_entry_safe (vol_opt, tmp, &xl->volume_options, list) { + list_del_init (&vol_opt->list); + GF_FREE (vol_opt); + } + GF_FREE (xl); return 0; -- cgit