]> git.hungrycats.org Git - linux/commitdiff
Btrfs: fix em leak in find_first_block_group
authorJosef Bacik <jbacik@fb.com>
Thu, 18 Aug 2016 19:25:51 +0000 (15:25 -0400)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 24 Sep 2016 04:13:30 +0000 (00:13 -0400)
We need to call free_extent_map() on the em we look up.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>
(cherry picked from commit b374bd454dad6486e10b386e2196f950a0c6e294)

fs/btrfs/extent-tree.c

index 03f487ea837c11b79838106e5dffac933784cc3d..77b2f9479a16c8284749bcb1fefe6a45b0e37c37 100644 (file)
@@ -9613,6 +9613,7 @@ static int find_first_block_group(struct btrfs_root *root,
                        } else {
                                ret = 0;
                        }
+                       free_extent_map(em);
                        goto out;
                }
                path->slots[0]++;