summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2011-08-22 14:55:09 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-22 02:50:26 -0700
commitd9ead57226faf82f3f1375a29e06d348625ba905 (patch)
tree6339dc3b93e207c1a74c621438ca73d55c4d9bed /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent4f9396545ba9c91d4bebfc81148c0082237141f4 (diff)
mgmt/glusterd: Initialize local variable in volgen
Change-Id: I84b4f7c9c2787334ce67e5c3e0534953b691c8e0 BUG: 3460 Reviewed-on: http://review.gluster.com/295 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c4
1 files changed, 3 insertions, 1 deletions
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) )