commit 00862f7f5b5dddd0fa00b4b5c7e2827fdda53f99 from: Omar Polo via: Thomas Adam date: Fri Jul 12 06:00:18 2024 UTC gotwebd: plug fd leak in error path commit - 84a2b96d223ec79d31415330020d25182c98ba91 commit + 00862f7f5b5dddd0fa00b4b5c7e2827fdda53f99 blob - 4ad005cc318e01737a6c54bb7dc0d0d587a0eeda blob + 1686c4e5cb48541c95368a8b62336256a61acbd1 --- gotwebd/got_operations.c +++ gotwebd/got_operations.c @@ -1153,15 +1153,15 @@ got_open_diff_for_output(FILE **fp, struct request *c) error = got_gotweb_openfile(&f1, &c->priv_fd[DIFF_FD_1]); if (error) - return error; + goto done; error = got_gotweb_openfile(&f2, &c->priv_fd[DIFF_FD_2]); if (error) - return error; + goto done; error = got_gotweb_openfile(&f3, &c->priv_fd[DIFF_FD_3]); if (error) - return error; + goto done; rc = TAILQ_FIRST(&t->repo_commits);