Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pack-mtimes.c')
-rw-r--r--pack-mtimes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pack-mtimes.c b/pack-mtimes.c
index 0e0aafdcb0..0f9785fc5e 100644
--- a/pack-mtimes.c
+++ b/pack-mtimes.c
@@ -89,7 +89,8 @@ cleanup:
*data_p = data;
}
- close(fd);
+ if (fd >= 0)
+ close(fd);
return ret;
}