summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/client_t.c
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2015-07-06 15:45:45 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-07-06 08:15:25 -0700
commit5547db849770ff79a11a8bc1260478c56e4ffa9c (patch)
tree91733de69c601eb4ccae66a95ce630c163d9df84 /libglusterfs/src/client_t.c
parentc9765bcb1557ab1e921080e7de4f3ebac1e424d5 (diff)
protocol/server: Add null check to gf_client_put
Change-Id: I8bab3cd7387f89743e15e7569f0bc83a7df3c754 BUG: 1240161 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/11550 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'libglusterfs/src/client_t.c')
-rw-r--r--libglusterfs/src/client_t.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c
index 4f51de9..1c29151 100644
--- a/libglusterfs/src/client_t.c
+++ b/libglusterfs/src/client_t.c
@@ -288,6 +288,9 @@ gf_client_put (client_t *client, gf_boolean_t *detached)
gf_boolean_t unref = _gf_false;
int bind_ref;
+ if (client == NULL)
+ goto out;
+
if (detached)
*detached = _gf_false;
@@ -304,6 +307,9 @@ gf_client_put (client_t *client, gf_boolean_t *detached)
*detached = _gf_true;
gf_client_unref (client);
}
+
+out:
+ return;
}
client_t *