Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: Cleanup Git logo and Git logo target generation
[gitweb.git]
/
copy.c
diff --git
a/copy.c
b/copy.c
index 7100eedbc3277b9b0997311459d054ba06950b61..08a3d388a4c312fca18558b2b8e5dcf027c7afaf 100644
(file)
--- a/
copy.c
+++ b/
copy.c
@@
-22,11
+22,14
@@
int copy_fd(int ifd, int ofd)
buf += written;
len -= written;
}
- else if (!written)
+ else if (!written) {
+ close(ifd);
return error("copy-fd: write returned 0");
- else
+ } else {
+ close(ifd);
return error("copy-fd: write returned %s",
strerror(errno));
+ }
}
}
close(ifd);