commit 1b2f32fbcbbab1e5f19815a91667ebc56dd2463f from: Stefan Sperling via: Thomas Adam date: Thu Oct 27 11:26:40 2022 UTC add missing check for errors from got_gotconfig_read() in open_worktree() commit - 6ca25bfcab74e714d1227f536dd9ccaf8f9e8155 commit + 1b2f32fbcbbab1e5f19815a91667ebc56dd2463f blob - 7aa2401edb6492104ef2cbd4dfa66633a5c5490b blob + 6899fcc655eccfe88e1d3e566ff3f224b5cbc71b --- lib/worktree_open.c +++ lib/worktree_open.c @@ -216,6 +216,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);