diff options
Diffstat (limited to 'pack-revindex.c')
-rw-r--r-- | pack-revindex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pack-revindex.c b/pack-revindex.c index 83fe4de773..4262530449 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; } |