summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/common.c
diff options
context:
space:
mode:
authorXavier Hernandez <jahernan@redhat.com>2017-11-20 10:51:09 +0100
committerShyamsundar Ranganathan <srangana@redhat.com>2017-11-27 18:12:28 +0000
commitce324cb755e82f520acc36caad8eab4fbcdd3a6f (patch)
tree5ef44b81f66466a7110ab9fd3cee79aa22b7e69d /xlators/features/locks/src/common.c
parentcccf80cade09efca5f5e56a8e971251d6eb5adfe (diff)
features/locks: Fix memory leaks
Backport of: > BUG: 1515161 Change-Id: Ic1d2e17a7d14389b6734d1b88bd28c0a2907bbd6 BUG: 1517682 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/common.c')
-rw-r--r--xlators/features/locks/src/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index bd479ea439a..fa4dee487d1 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -438,6 +438,7 @@ pl_inode_get (xlator_t *this, inode_t *inode)
ret = __inode_ctx_put (inode, this, (uint64_t)(long)(pl_inode));
if (ret) {
+ pthread_mutex_destroy (&pl_inode->mutex);
GF_FREE (pl_inode);
pl_inode = NULL;
goto unlock;