diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-09-14 04:02:27 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-09-26 19:37:06 +0200 |
commit | a958eab0ed7fdc1b977bc25d3af6efedaa945488 (patch) | |
tree | dbb8ced3615f54c919f3bd80cc12fb96517c97a2 | |
parent | btrfs: btrfs_debug should consume fs_info when DEBUG is not defined (diff) | |
download | linux-a958eab0ed7fdc1b977bc25d3af6efedaa945488.tar.xz linux-a958eab0ed7fdc1b977bc25d3af6efedaa945488.zip |
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>
-rw-r--r-- | fs/btrfs/extent-tree.c | 1 |
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; } |