Commit 4bf414d2 authored by Josef Bacik's avatar Josef Bacik Committed by Greg Kroah-Hartman

Btrfs: fix em leak in find_first_block_group

commit 187ee58c upstream.

We need to call free_extent_map() on the em we look up.
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a155ec93
......@@ -9518,6 +9518,7 @@ static int find_first_block_group(struct btrfs_root *root,
} else {
ret = 0;
}
free_extent_map(em);
goto out;
}
path->slots[0]++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment