[069/111] Btrfs: fix a memory leak in btrfs_init_acl

From: Greg KH
Date: Wed Aug 11 2010 - 20:32:37 EST


2.6.32-stable review patch. If anyone has any objections, please let us know.

------------------

From: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>

commit f858153c367a397235d3e81136741e40e44faf1d upstream.

In btrfs_init_acl() cloned acl is not released

Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
Signed-off-by: Chris Mason <chris.mason@xxxxxxxxxx>
Acked-by: Jeff Mahoney <jeffm@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>


---
fs/btrfs/acl.c | 1 +
1 file changed, 1 insertion(+)

--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -272,6 +272,7 @@ int btrfs_init_acl(struct btrfs_trans_ha
ACL_TYPE_ACCESS);
}
}
+ posix_acl_release(clone);
}
failed:
posix_acl_release(acl);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/