aboutsummaryrefslogtreecommitdiff
path: root/fs/jffs2/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/acl.c')
-rw-r--r--fs/jffs2/acl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 993ddfce031..4c80404a9ab 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -345,8 +345,10 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
if (!clone)
return -ENOMEM;
rc = posix_acl_create_masq(clone, (mode_t *)i_mode);
- if (rc < 0)
+ if (rc < 0) {
+ posix_acl_release(clone);
return rc;
+ }
if (rc > 0)
jffs2_iset_acl(inode, &f->i_acl_access, clone);