Btrfs: fix em leak in find_first_block_group

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>
This commit is contained in:
Josef Bacik 2016-08-18 15:30:06 -04:00 committed by Chris Mason
parent 1423881941
commit 187ee58c62

View File

@ -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]++;