From 27620d0f7d9b101cc47a13a23928f767248a8cff Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 30 May 2012 19:02:29 +0530 Subject: protocol/client: do not access the local object after being freed Change-Id: I2d3aeb084168b9ed68a670b91e09126917f82968 BUG: 826588 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.com/3494 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/protocol/client/src/client-handshake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') 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; -- cgit