From 0af88a6c33e8fd57745997afb7c68e4ef6023fbf Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Mon, 9 Sep 2019 10:01:04 +0530 Subject: glusterd, rpc, glusterfsd: fix coverity defects and put required annotations 1404965 - Null pointer dereference 1404316 - Program hangs 1401715 - Program hangs 1401713 - Program hangs Updates: bz#789278 Change-Id: I6e6575daafcb067bc910445f82a9d564f43b75a2 Signed-off-by: Atin Mukherjee --- xlators/protocol/client/src/client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/client/src') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 45e7bfedf91..5ef866fe03f 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -64,10 +64,14 @@ int client_is_last_child_down(xlator_t *this, int32_t event, struct rpc_clnt *rpc) { rpc_clnt_connection_t *conn = NULL; + clnt_conf_t *conf = NULL; int ret = 0; - clnt_conf_t *conf = this->private; - if (!this || !rpc || !conf) + if (!this || !rpc) + goto out; + + conf = this->private; + if (!conf) goto out; if (!conf->parent_down) -- cgit