Btrfs: add missing error handling to read_tree_block
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
committed by
Chris Mason
parent
eb2067f713
commit
0f0fe8f710
@@ -1149,6 +1149,10 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ret = btree_read_extent_buffer_pages(root, buf, 0, parent_transid);
|
ret = btree_read_extent_buffer_pages(root, buf, 0, parent_transid);
|
||||||
|
if (ret) {
|
||||||
|
free_extent_buffer(buf);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
return buf;
|
return buf;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user