From 9433cc43efd8d63b66ce5c0927a7bde01a6b7304 Mon Sep 17 00:00:00 2001 From: Poornima Date: Tue, 4 Feb 2014 05:55:02 +0000 Subject: glusterd: Fix the NULL dereference errors reported by coverity. Change-Id: I51c120dfe2db44a2b74f35e5cafb4f364ed6e66e BUG: 789278 Signed-off-by: Poornima Reviewed-on: http://review.gluster.org/6901 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 963aa0762..5758e217d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -354,6 +354,10 @@ glusterd_validate_quorum_options (xlator_t *this, char *fullkey, char *value, if (!glusterd_is_quorum_option (fullkey)) goto out; key = strchr (fullkey, '.'); + if (key == NULL) { + ret = -1; + goto out; + } key++; opt = xlator_volume_option_get (this, key); ret = xlator_option_validate (this, key, value, opt, op_errstr); -- cgit