add missing error check in got_worktree_status()
diff --git a/lib/worktree.c b/lib/worktree.c
index 8ff5d83..c5cad3c 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -1090,6 +1090,10 @@ got_worktree_status(struct got_worktree *worktree,
}
workdir = opendir(worktree->root_path);
+ if (workdir == NULL) {
+ err = got_error_from_errno();
+ goto done;
+ }
fdiff_cb.diff_old_new = status_old_new;
fdiff_cb.diff_old = status_old;
fdiff_cb.diff_new = status_new;