commit - 571608344a37fb96f46850a1124415ab68b1a431
commit + 13242195c28da5b721878751b7cb7beb3fa0e264
blob - f4585bf3d903303171bdbc6a683382e865a425e9
blob + 66dce96b54785bf451b150d44880b57fab657b42
--- lib/repository.c
+++ lib/repository.c
}
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");