Commit a958eab0 authored by Liu Bo's avatar Liu Bo Committed by David Sterba

Btrfs: fix memory leak in do_walk_down

The extent buffer 'next' needs to be free'd conditionally.
Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c01f5f96
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment