diff --git a/volumes.c b/volumes.c index 582f3336..6182ed6c 100644 --- a/volumes.c +++ b/volumes.c @@ -1717,6 +1717,8 @@ int btrfs_read_chunk_tree(struct btrfs_root *root) key.offset = 0; key.type = 0; ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); + if (ret < 0) + goto error; while(1) { leaf = path->nodes[0]; slot = path->slots[0];