From 63eb488298d48059a746384110f3d9a11d0aaa71 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Sat, 4 Nov 2017 23:37:18 +0530 Subject: protocol/server : Coverity Fixes Coverity ID: 802 Coverity ID: 741 Coverity ID: 808 Change-Id: If1b3196f0d1ba850c349c65f1626e41dcf42b6b6 BUG: 789278 Signed-off-by: Ashish Pandey --- xlators/protocol/server/src/server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 5271d157ba6..a7fe3b2eedf 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -77,7 +77,7 @@ grace_time_handler (void *data) */ gf_client_put (client, &detached); - if (detached) /* reconnection did not happen :-( */ + if (client && detached) /* reconnection did not happen :-( */ server_connection_cleanup (this, client, INTERNAL_LOCKS | POSIX_LOCKS); gf_client_unref (client); @@ -547,7 +547,7 @@ server_rpc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, if (!conf->lk_heal) { gf_client_ref (client); gf_client_put (client, &detached); - if (detached) { + if (client && detached) { server_connection_cleanup (this, client, INTERNAL_LOCKS | POSIX_LOCKS); @@ -833,7 +833,6 @@ reconfigure (xlator_t *this, dict_t *options) gf_msg (this->name, GF_LOG_ERROR, 0, PS_MSG_STATEDUMP_PATH_ERROR, "Error while reconfiguring statedump path"); - ret = -1; goto do_auth; } gf_path_strip_trailing_slashes (statedump_path); -- cgit