btrfs: Fix a memleak on failed posix acl conversion
PATCH 1/1 btrfs: Fix a memleak on failed posix acl conversion
Signed-off-by Aneesh Kumar K.V <[email protected]>
--- fs/btrfs/acl.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
fs/btrfs/acl.c +3 -1
@@ -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);
Signature · 1 line
1.7.2.rc3.43.g24e7a