Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / btrfs / acl.c
index 6ae2c8cac9d568ee754f6913c29302555ee44593..15b5ca2a260624fd7549b91175ff3d8ce28c2014 100644 (file)
@@ -60,8 +60,10 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
                size = __btrfs_getxattr(inode, name, value, size);
                if (size > 0) {
                        acl = posix_acl_from_xattr(value, size);
-                       if (IS_ERR(acl))
+                       if (IS_ERR(acl)) {
+                               kfree(value);
                                return acl;
+                       }
                        set_cached_acl(inode, type, acl);
                }
                kfree(value);