Commit 2e2adf26 authored by Josef Bacik's avatar Josef Bacik Committed by Stefan Bader

Btrfs: fix em leak in find_first_block_group

BugLink: https://bugs.launchpad.net/bugs/1818237

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>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 2d0d0a8b
...@@ -9518,6 +9518,7 @@ static int find_first_block_group(struct btrfs_root *root, ...@@ -9518,6 +9518,7 @@ static int find_first_block_group(struct btrfs_root *root,
} else { } else {
ret = 0; ret = 0;
} }
free_extent_map(em);
goto out; goto out;
} }
path->slots[0]++; 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