diff options
-rw-r--r-- | libglusterfs/src/xlator.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index e826228ed31..42c701a2d8e 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -156,7 +156,6 @@ xlator_volopt_dynload (char *xlator_type, void **dl_handle, } *dl_handle = handle; - INIT_LIST_HEAD (&opt_list->list); vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t), gf_common_mt_volume_opt_list_t); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 73650e34507..d16289a21ac 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1748,7 +1748,7 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) char *xlator_type = NULL; void *dl_handle = NULL; - volume_opt_list_t vol_opt_handle; + volume_opt_list_t vol_opt_handle = {{0},}; char *key = NULL; struct volopt_map_entry *vme = NULL; int ret = -1; @@ -1777,6 +1777,8 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) goto out; } + INIT_LIST_HEAD (&vol_opt_handle.list); + for (vme = &glusterd_volopt_map[0]; vme->key; vme++) { if ( ( vme->type == NO_DOC) || (vme->type == GLOBAL_NO_DOC) ) |