diff options
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r-- | libglusterfs/src/xlator.c | 8 |
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; |