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>
This commit is contained in:
Raghavendra Bhat 2012-05-30 19:02:29 +05:30 committed by Anand Avati
parent 69dd0b2e82
commit 27620d0f7d

View File

@ -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;