commit 13242195c28da5b721878751b7cb7beb3fa0e264 from: Stefan Sperling date: Tue May 31 18:34:45 2022 UTC ensure that all open basefd/accumfd get closed in got_repo_close() found by tracey commit - 571608344a37fb96f46850a1124415ab68b1a431 commit + 13242195c28da5b721878751b7cb7beb3fa0e264 blob - f4585bf3d903303171bdbc6a683382e865a425e9 blob + 66dce96b54785bf451b150d44880b57fab657b42 --- lib/repository.c +++ lib/repository.c @@ -797,9 +797,8 @@ got_repo_close(struct got_repository *repo) } for (i = 0; i < repo->pack_cache_size; i++) { - if (repo->packs[i].path_packfile == NULL) - break; - got_pack_close(&repo->packs[i]); + if (repo->packs[i].path_packfile) + got_pack_close(&repo->packs[i]); if (repo->packs[i].basefd != -1) { if (close(repo->packs[i].basefd) == -1 && err == NULL) err = got_error_from_errno("close");