summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2016-03-17 13:37:59 +0530
committerAtin Mukherjee <amukherj@redhat.com>2016-03-21 10:49:49 -0700
commit696fbf9b18078a7ac28080d841f0de2306786b87 (patch)
tree6f14a5e909bf73b92775a180095c1cea0c11da95 /xlators
parent9879c4e543e37de753b2650ab6fcd427afb0169d (diff)
glusterd/snapshot: dereferencing null variable resulted in crash
When we add service details into dictionary, snapd is volume based service. So the svc variable for snapd will be stored in volinfo. But when we trying to add details for snapd node alone we use generic function, ie that won't have the svc variable initialized. Change-Id: I7e4abc477e6c520388d696548ffa260a43281827 BUG: 1318544 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/13759 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 05b59950da6..717959b662b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -3222,8 +3222,8 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
other_count++;
node_count++;
} else if ((cmd & GF_CLI_STATUS_SNAPD) != 0) {
- ret = glusterd_add_node_to_dict ("snapd", rsp_dict, 0,
- vol_opts);
+ ret = glusterd_add_snapd_to_dict (volinfo, rsp_dict,
+ other_index);
if (ret)
goto out;
other_count++;