commit 2f6519cc051376f41ed4f45fcd6d63c0e7ff5642 from: Stefan Sperling date: Thu Oct 27 09:21:33 2022 UTC add missing check for errors from got_gotconfig_read() in open_worktree() commit - d45bf965ad22b8cd812b96ded2ee1f81de7e9ab1 commit + 2f6519cc051376f41ed4f45fcd6d63c0e7ff5642 blob - 529f4b6767b84a31e24d93b402c6a3c8226cdd74 blob + 5fce2fbe10e55e0634d68aff25cbc1a5350ebe71 --- 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);