summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorPoornima <pgurusid@redhat.com>2014-02-04 05:55:02 +0000
committerVijay Bellur <vbellur@redhat.com>2014-02-07 08:47:15 -0800
commit9433cc43efd8d63b66ce5c0927a7bde01a6b7304 (patch)
tree2382742678c7a58c8ad1cb877a9cc9e46bd5b484 /xlators/mgmt/glusterd/src/glusterd-handler.c
parent9f699ccd42712e5b991bd33319caf1e5c902f894 (diff)
glusterd: Fix the NULL dereference errors reported by coverity.
Change-Id: I51c120dfe2db44a2b74f35e5cafb4f364ed6e66e BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6901 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 0407741bb7b..ab3fa94c0fa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -3654,11 +3654,11 @@ get_brickinfo_from_brickid (char *brickid, glusterd_brickinfo_t **brickinfo)
volid_str = brickid_dup;
brick = strchr (brickid_dup, ':');
- *brick = '\0';
- brick++;
if (!volid_str || !brick)
goto out;
+ *brick = '\0';
+ brick++;
uuid_parse (volid_str, volid);
ret = glusterd_volinfo_find_by_volume_id (volid, &volinfo);
if (ret)