linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: fix em leak in find_first_block_group
@ 2016-08-18 19:30 Josef Bacik
  2016-08-19 17:31 ` Omar Sandoval
  2016-08-24 18:24 ` Liu Bo
  0 siblings, 2 replies; 4+ messages in thread
From: Josef Bacik @ 2016-08-18 19:30 UTC (permalink / raw)
  To: linux-btrfs

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>
---
 fs/btrfs/extent-tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 61b494e..20f9fa6 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -9906,6 +9906,7 @@ static int find_first_block_group(struct btrfs_root *root,
 			} else {
 				ret = 0;
 			}
+			free_extent_map(em);
 			goto out;
 		}
 		path->slots[0]++;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-24 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 19:30 [PATCH] Btrfs: fix em leak in find_first_block_group Josef Bacik
2016-08-19 17:31 ` Omar Sandoval
2016-08-23 11:41   ` David Sterba
2016-08-24 18:24 ` Liu Bo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).