walk_down_tree will fault when read_tree_block fails with NULL returned. Signed-off-by: Lin Ming <mlin@xxxxxxxxxx> --- cmds-check.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cmds-check.c b/cmds-check.c index 12192fa..e4435d5 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -1256,6 +1256,8 @@ static int walk_down_tree(struct btrfs_root *root, struct btrfs_path *path, reada_walk_down(root, cur, path->slots[*level]); next = read_tree_block(root, bytenr, blocksize, ptr_gen); + if (!next) + goto out; } *level = *level - 1; -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
