Skip to content

Commit

Permalink
Btrfs: fix em leak in find_first_block_group
Browse files Browse the repository at this point in the history
We need to call free_extent_map() on the em we look up.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Josef Bacik authored and Chris Mason committed Aug 25, 2016
1 parent 1423881 commit 187ee58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -9887,6 +9887,7 @@ static int find_first_block_group(struct btrfs_root *root,
} else {
ret = 0;
}
free_extent_map(em);
goto out;
}
path->slots[0]++;
Expand Down

0 comments on commit 187ee58

Please sign in to comment.