aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLiu Bo2016-09-13 19:02:27 -0700
committerDavid Sterba2016-09-26 19:37:06 +0200
commita958eab0ed7fdc1b977bc25d3af6efedaa945488 (patch)
treedbb8ced3615f54c919f3bd80cc12fb96517c97a2 /fs
parentc01f5f96f511419ee656a60e09605b7b6a63b66c (diff)
Btrfs: fix memory leak in do_walk_down
The extent buffer 'next' needs to be free'd conditionally. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-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 56d8ec21a0f4..e229d740bdfe 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -8891,6 +8891,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
&wc->flags[level - 1]);
if (ret < 0) {
btrfs_tree_unlock(next);
+ free_extent_buffer(next);
return ret;
}