summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2016-08-18 15:30:06 -0400
committerChris Mason <clm@fb.com>2016-08-25 03:58:29 -0700
commit187ee58c62c1d0d238d3dc4835869d33e1869906 (patch)
treead8f62ffed2caf32e548358d80b92ca36b30423f /fs/btrfs
parent142388194191a3edc9ba01cfcfd8b691e0971fb2 (diff)
downloadlinux-187ee58c62c1d0d238d3dc4835869d33e1869906.tar.bz2
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index d5d3cfb1f66f..60d4ae7ce974 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -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]++;