summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2012-05-30 19:02:29 +0530
committerAnand Avati <avati@redhat.com>2012-05-31 17:56:55 -0700
commit27620d0f7d9b101cc47a13a23928f767248a8cff (patch)
tree2588fb1b656bf5396e1040cadf858a4eaccb0ac1 /xlators/protocol
parent69dd0b2e824e6eeb585bed99d13680ce94a23d11 (diff)
protocol/client: do not access the local object after being freed
Change-Id: I2d3aeb084168b9ed68a670b91e09126917f82968 BUG: 826588 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3494 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-handshake.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 64e0c356d..0b82ed4e8 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -750,8 +750,8 @@ client_reacquire_lock_cbk (struct rpc_req *req, struct iovec *iov,
get_lk_type (lock.l_type), uuid_utoa (fdctx->inode->gfid),
lock.l_start, lock.l_start + lock.l_len);
- if (clnt_fd_lk_local_unref (this, local) == 0 &&
- !clnt_fd_lk_local_error_status (this, local)) {
+ if (!clnt_fd_lk_local_error_status (this, local) &&
+ clnt_fd_lk_local_unref (this, local) == 0) {
pthread_mutex_lock (&conf->lock);
{
fdctx->lk_heal_state = GF_LK_HEAL_DONE;