summaryrefslogtreecommitdiff
path: root/btrfsck.c
diff options
context:
space:
mode:
Diffstat (limited to 'btrfsck.c')
-rw-r--r--btrfsck.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/btrfsck.c b/btrfsck.c
index c50de7d8..1fcc372e 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -2075,6 +2075,9 @@ int main(int ac, char **av)
radix_tree_init();
root = open_ctree(av[1], 0, 0);
+ if (root == NULL)
+ return 1;
+
ret = check_extents(root);
if (ret)
goto out;