commit 991ff1aa4f423a1faea1bae0e85a913a88038309 from: Tracey Emery date: Tue Jun 15 22:16:22 2021 UTC close all opened repo->gitdir_fd's and set open_repo static. ok naddy (with static change) commit - 0d15f6dcf929ae42606d3ca046621aee79e45890 commit + 991ff1aa4f423a1faea1bae0e85a913a88038309 blob - a97375aa5712bae416359100f0059fa17f6cfc46 blob + 16616cca614bcd144f1e84477ab65ea3f34b7b0e --- lib/repository.c +++ lib/repository.c @@ -333,7 +333,7 @@ got_repo_get_cached_tag(struct got_repository *repo, s &repo->tagcache, id); } -const struct got_error * +static const struct got_error * open_repo(struct got_repository *repo, const char *path) { const struct got_error *err = NULL; @@ -752,6 +752,9 @@ got_repo_close(struct got_repository *repo) err = got_error_from_errno("close"); } + if (repo->gitdir_fd != -1) + close(repo->gitdir_fd); + if (repo->gotconfig) got_gotconfig_free(repo->gotconfig); free(repo->gitconfig_author_name);