mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
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>
This commit is contained in:
parent
c01f5f96f5
commit
a958eab0ed
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue