diff mbox

btrfs: fix memory leak on error path in btrfs_get_acl()

Message ID 1292450256-4544-1-git-send-email-mk@lab.zgora.pl (mailing list archive)
State New, archived
Headers show

Commit Message

Mariusz Kozlowski Dec. 15, 2010, 9:57 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 2222d16..11c9561 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -61,6 +61,7 @@  static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
 		if (size > 0) {
 			acl = posix_acl_from_xattr(value, size);
 			if (IS_ERR(acl))
+				kfree(value);
 				return acl;
 			set_cached_acl(inode, type, acl);
 		}