From 696fbf9b18078a7ac28080d841f0de2306786b87 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Thu, 17 Mar 2016 13:37:59 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/13759 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Avra Sengupta Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src') 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++; -- cgit