Btrfs: fix memory leak in do_walk_down
commit a958eab0ed7fdc1b977bc25d3af6efedaa945488 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5a9b659ede
commit
1078000619
1 changed files with 1 additions and 0 deletions
|
@ -8488,6 +8488,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue