diff options
author | Raghavendra G <rgowdapp@redhat.com> | 2015-07-06 15:45:45 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-07-09 03:10:49 -0700 |
commit | 7fe55d6ffc73d614890c3fb9a3139cb7a6236423 (patch) | |
tree | 290ca5ddfbadee718fde987c4129123966015ebc /libglusterfs/src | |
parent | fe68152df36f6a6529a465c0ea25568fd557a901 (diff) |
protocol/server: Add null check to gf_client_put
Change-Id: I8bab3cd7387f89743e15e7569f0bc83a7df3c754
BUG: 1240603
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>
Reviewed-on: http://review.gluster.org/11562
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/client_t.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c index b7462fcaec3..a66be21a012 100644 --- a/libglusterfs/src/client_t.c +++ b/libglusterfs/src/client_t.c @@ -293,6 +293,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; @@ -309,6 +312,9 @@ gf_client_put (client_t *client, gf_boolean_t *detached) *detached = _gf_true; gf_client_unref (client); } + +out: + return; } client_t * |