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:
-rw-r--r--sha1_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 0897b945e5..42aef331f2 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2155,7 +2155,8 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer,
inflateEnd(&stream);
fchmod(local, 0444);
- close(local);
+ if (close(local) != 0)
+ die("unable to write sha1 file");
SHA1_Final(real_sha1, &c);
if (ret != Z_STREAM_END) {
unlink(tmpfile);