Thread (4 messages) 4 messages, 4 authors, 2016-08-24

Re: [PATCH] Btrfs: fix em leak in find_first_block_group

From: Liu Bo <hidden>
Date: 2016-08-24 18:25:51

On Thu, Aug 18, 2016 at 03:30:06PM -0400, Josef Bacik wrote:
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.
Thanks for fixing it.

Reviewed-by: Liu Bo <redacted>

Thanks,

-liubo
quoted hunk ↗ jump to hunk
Signed-off-by: Josef Bacik <redacted>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help