summaryrefslogtreecommitdiffstats
path: root/xlators/system
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/system')
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index 3f4d40af48e..ed117b809cb 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -310,6 +310,10 @@ __posix_acl_ctx_get (inode_t *inode, xlator_t *this, gf_boolean_t create)
return NULL;
ret = __inode_ctx_put (inode, this, UINT64 (ctx));
+ if (ret) {
+ GF_FREE (ctx);
+ ctx = NULL;
+ }
return ctx;
}