Btrfs: fix a memory leak in btrfs_init_acl
authorYang Hongyang <yanghy@cn.fujitsu.com>
Tue, 26 Jan 2010 00:48:23 +0000 (00:48 +0000)
committerChris Mason <chris.mason@oracle.com>
Thu, 28 Jan 2010 21:20:39 +0000 (16:20 -0500)
In btrfs_init_acl() cloned acl is not released

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/acl.c

index fa44e92..da3133c 100644 (file)
@@ -269,6 +269,7 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
                                                    ACL_TYPE_ACCESS);
                        }
                }
+               posix_acl_release(clone);
        }
 failed:
        posix_acl_release(acl);