Browse Source

Btrfs: add missing free_extent_buffer

read_tree_block may take a reference on the 'eb', a following
free_extent_buffer is necessary.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Liu Bo 10 years ago
parent
commit
8635eda91e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      fs/btrfs/extent-tree.c

+ 1 - 0
fs/btrfs/extent-tree.c

@@ -7981,6 +7981,7 @@ walk_down:
 			eb = read_tree_block(root, child_bytenr, child_gen);
 			if (!eb || !extent_buffer_uptodate(eb)) {
 				ret = -EIO;
+				free_extent_buffer(eb);
 				goto out;
 			}