summaryrefslogtreecommitdiffstats
path: root/xlators/features/snapview-server
diff options
context:
space:
mode:
authorarao <arao@redhat.com>2015-02-17 14:54:45 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-31 01:19:53 -0700
commit17d719c9ba08ba6b6eb040723f78cfa45b0c2ae7 (patch)
treec81a4b0dce7cd856bf8025dca1de9f0d1658f619 /xlators/features/snapview-server
parent2acb5325828a68b06b39ab44e6736c6ad4ca3a06 (diff)
features/snapview-server: Fixing explicit null dereferencing.
CID: 1238184 The pointer was not checked for null before dereferencing in the 'out' label, which is resolved now. Change-Id: I8aa7520102b84f63727754b8ac9c1f87ef8a6671 BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9662 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/snapview-server')
-rw-r--r--xlators/features/snapview-server/src/snapview-server-mgmt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server-mgmt.c b/xlators/features/snapview-server/src/snapview-server-mgmt.c
index f2a1e7b7893..a4ce89cd47c 100644
--- a/xlators/features/snapview-server/src/snapview-server-mgmt.c
+++ b/xlators/features/snapview-server/src/snapview-server-mgmt.c
@@ -111,11 +111,12 @@ svs_mgmt_init (xlator_t *this)
gf_log (this->name, GF_LOG_DEBUG, "svs mgmt init successful");
out:
- if (ret) {
- rpc_clnt_connection_cleanup (&priv->rpc->conn);
- rpc_clnt_unref (priv->rpc);
- priv->rpc = NULL;
- }
+ if (ret)
+ if (priv) {
+ rpc_clnt_connection_cleanup (&priv->rpc->conn);
+ rpc_clnt_unref (priv->rpc);
+ priv->rpc = NULL;
+ }
return ret;
}