summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2019-09-09 10:01:04 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-09-10 04:18:45 +0000
commit0af88a6c33e8fd57745997afb7c68e4ef6023fbf (patch)
tree8e48ca5fc7a08ae7453345223e633c01c1c75687 /xlators/protocol
parentea95631ff47c8048f039faedbc0faa918c4e165a (diff)
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 <amukherj@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 45e7bfe..5ef866f 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)