summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
authorKaushik BV <kaushikbv@gluster.com>2010-10-09 06:58:00 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-09 06:45:33 -0700
commit2eb9861cbc0387b1054bfeb7864c255a42b475f5 (patch)
tree3b06d67d794d798ce852566d3e6a7efe9a83781d /libglusterfs/src/xlator.c
parentafb6997fe74af257c7e687e33fe88a292f7a4a00 (diff)
mgmt/Glusterd: Memory leak fixes, minor CLI changesv3.1.0qa44
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1852 (Usage message of volume set printed twice) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1852
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index ff1dc5efa26..b0f3eba4a54 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;