diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2019-09-09 10:01:04 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-09-10 04:18:45 +0000 |
commit | 0af88a6c33e8fd57745997afb7c68e4ef6023fbf (patch) | |
tree | 8e48ca5fc7a08ae7453345223e633c01c1c75687 /xlators/protocol | |
parent | ea95631ff47c8048f039faedbc0faa918c4e165a (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.c | 8 |
1 files changed, 6 insertions, 2 deletions
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) |