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 fa44e92e9b8fa437c6d18fc4643fdbc66bde7905..da3133c698302db7b602902d166287a11fb52af1 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);