From 06ee9e13db03a02b343a5d44cae3c4a5da48bf8a Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 14 Jun 2019 12:53:15 +0530 Subject: clang-scan: resolve warning dht-common.c: because there was a 'goto err' before assigning the 'local' variable, there is possibility of NULL dereference. As the check which was done wouldn't ever be true, removed the check. glusterd-geo-rep.c: a possible path where 'slave_host' could be NULL when it gets passed to strcmp() is found. strcmp() expects a valid string. Add a NULL check. Updates: bz#1622665 Change-Id: I64c280bc1beac9a2b109e8fa88f2a5ce8b823c3a Signed-off-by: Amar Tumballi --- xlators/cluster/dht/src/dht-common.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'xlators/cluster/dht/src/dht-common.c') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 04b5f1c2fe6..6816bfd356c 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -9052,8 +9052,6 @@ dht_mkdir_hashed_cbk(call_frame_t *frame, void *cookie, xlator_t *this, gf_boolean_t parent_layout_changed = _gf_false; call_stub_t *stub = NULL; - VALIDATE_OR_GOTO(this->private, err); - local = frame->local; prev = cookie; layout = local->layout; @@ -9644,8 +9642,6 @@ dht_rmdir_lock_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int i = 0; xlator_t *hashed_subvol; - VALIDATE_OR_GOTO(this->private, err); - conf = this->private; local = frame->local; -- cgit