summaryrefslogtreecommitdiffstats
path: root/xlators/features/leases
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2017-03-01 16:38:21 +0100
committerVijay Bellur <vbellur@redhat.com>2017-03-07 22:09:29 -0500
commit7ddab8fa7b05343e4a110fadc227675479f9e358 (patch)
treeb031c350e098b37f8f8c23f9bcbcf62960139526 /xlators/features/leases
parentfabce246ae948e8e3060dee4a720cd64ac76fdaf (diff)
Free the mutex even if we can't allocate a inode
Since GF_CHECK_ALLOC may jump to out, with a mutex locked, we need to make sure the mutex is unlocked before returning. Error found by coverity Change-Id: I81011e18afc90c2c0fd489ceeb78d90ae31e35ba BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16793 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/leases')
-rw-r--r--xlators/features/leases/src/leases-internal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/leases/src/leases-internal.c b/xlators/features/leases/src/leases-internal.c
index 6884b581273..1f79e554489 100644
--- a/xlators/features/leases/src/leases-internal.c
+++ b/xlators/features/leases/src/leases-internal.c
@@ -482,8 +482,8 @@ add_inode_to_client_list (xlator_t *this, inode_t *inode, const char *client_uid
"cleanup list, gfid(%s)", inode, client_uid,
uuid_utoa (inode->gfid));
}
- pthread_mutex_unlock (&priv->mutex);
out:
+ pthread_mutex_unlock (&priv->mutex);
return ret;
}