summaryrefslogtreecommitdiff
path: root/pack-revindex.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-14 23:01:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-14 23:01:41 (GMT)
commit074d162eff7487c9e296124510147d3856029f5a (patch)
tree1152f8cdf5d5816f9e46a8a7456950f7195da30d /pack-revindex.c
parent5be1c705188c21e6a2ba698192b69de645268602 (diff)
parent66f52fa26b4facbf79e3f74d8bc95f8ac8535c50 (diff)
downloadgit-074d162eff7487c9e296124510147d3856029f5a.zip
git-074d162eff7487c9e296124510147d3856029f5a.tar.gz
git-074d162eff7487c9e296124510147d3856029f5a.tar.bz2
Merge branch 'tb/pack-revindex-on-disk'
Fix for a topic in 'master'. * tb/pack-revindex-on-disk: pack-revindex.c: don't close unopened file descriptors
Diffstat (limited to 'pack-revindex.c')
-rw-r--r--pack-revindex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pack-revindex.c b/pack-revindex.c
index 83fe4de..4262530 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -253,7 +253,8 @@ cleanup:
*data_p = (const uint32_t *)data;
}
- close(fd);
+ if (fd >= 0)
+ close(fd);
return ret;
}