There are 2 known extent buffer leaks:
1) With -t option.
-t option will skip other tree roots, but it will read the root node
first and then skip it.
Where it forgets to free the tree block it read.
2) with -b option.
It forgets to free the tree block it read.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
goto close_root;
}
btrfs_print_tree(root, leaf, 0);
+ free_extent_buffer(leaf);
goto close_root;
}
0);
if (!extent_buffer_uptodate(buf))
goto next;
- if (tree_id && found_key.objectid != tree_id)
+ if (tree_id && found_key.objectid != tree_id) {
+ free_extent_buffer(buf);
goto next;
+ }
switch(found_key.objectid) {
case BTRFS_ROOT_TREE_OBJECTID: