commit c513d110e1729047bf5918452e5b5a75c00a8e4f from: Stefan Sperling date: Tue Feb 05 16:15:06 2019 UTC add missing error check in got_worktree_status() commit - ad3741b624131a138e1dfe14e80127693a4a915d commit + c513d110e1729047bf5918452e5b5a75c00a8e4f blob - 8ff5d83ef0290ab7606a89942883d4d89faa2ce9 blob + c5cad3cd070acc1521feb0f2439c10e58fa16aee --- lib/worktree.c +++ 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;