Skip to content

Commit

Permalink
Btrfs: disk-io.c (open_ctree): avoid leaks upon allocation failure
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Jim Meyering authored and Chris Mason committed Oct 1, 2008
1 parent 0463bb4 commit 83afeac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
kfree(tree_root);
bdi_destroy(&fs_info->bdi);
kfree(fs_info);
kfree(chunk_root);
kfree(dev_root);
return ERR_PTR(err);
}

Expand Down

0 comments on commit 83afeac

Please sign in to comment.