summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/locks/src')
-rw-r--r--xlators/features/locks/src/common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index facb078612f..4a9b138cb80 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -434,7 +434,12 @@ pl_inode_get (xlator_t *this, inode_t *inode)
INIT_LIST_HEAD (&pl_inode->blocked_calls);
gf_uuid_copy (pl_inode->gfid, inode->gfid);
- __inode_ctx_put (inode, this, (uint64_t)(long)(pl_inode));
+ ret = __inode_ctx_put (inode, this, (uint64_t)(long)(pl_inode));
+ if (ret) {
+ GF_FREE (pl_inode);
+ pl_inode = NULL;
+ goto unlock;
+ }
}
unlock:
UNLOCK (&inode->lock);