Commit Diff
--- lib/worktree_open.c +++ lib/worktree_open.c @@ -218,6 +218,8 @@ open_worktree(struct got_worktree **worktree, const ch err = got_gotconfig_read(&(*worktree)->gotconfig, (*worktree)->gotconfig_path); + if (err) + goto done; (*worktree)->root_fd = open((*worktree)->root_path, O_DIRECTORY | O_CLOEXEC);