Skip to content

Commit

Permalink
btrfs: fix error labels in init_btrfs_fs
Browse files Browse the repository at this point in the history
btrfs_interface_init rarely fails but we could leak the prelim_ref slab.

Signed-off-by: David Sterba <dsterba@suse.cz>
  • Loading branch information
David Sterba committed Oct 2, 2014
1 parent bfebd8b commit af13b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1999,11 +1999,11 @@ static int __init init_btrfs_fs(void)

err = btrfs_prelim_ref_init();
if (err)
goto free_prelim_ref;
goto free_delayed_ref;

err = btrfs_interface_init();
if (err)
goto free_delayed_ref;
goto free_prelim_ref;

btrfs_init_lockdep();

Expand Down

0 comments on commit af13b49

Please sign in to comment.