]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix memory leak in update_space_info failure path
authorJeff Mahoney <jeffm@suse.com>
Wed, 17 May 2017 13:49:37 +0000 (09:49 -0400)
committerDavid Sterba <dsterba@suse.com>
Thu, 1 Jun 2017 14:56:31 +0000 (16:56 +0200)
commit81acf91a20349ca043036ae189bad520524877ad
tree0026603a4f0d5d5064a6602a6224dc2f3c28be9b
parent333c86cba5996a00b9138b4a6e6e474e50c2b933
btrfs: fix memory leak in update_space_info failure path

If we fail to add the space_info kobject, we'll leak the memory
for the percpu counter.

Fixes: 8db7fa1708 (btrfs: publish allocation data in sysfs)
Cc: <stable@vger.kernel.org> # v3.14+
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c