Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/receive-pack-deadlocks-with-early-failure' into maint
author
Junio C Hamano
<gitster@pobox.com>
Fri, 26 Apr 2013 18:12:17 +0000
(11:12 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 26 Apr 2013 18:12:17 +0000
(11:12 -0700)
* jk/receive-pack-deadlocks-with-early-failure:
receive-pack: close sideband fd on early pack errors
builtin/receive-pack.c
patch
|
blob
|
history
raw
(from parent 1:
30e8180
)
diff --git
a/builtin/receive-pack.c
b/builtin/receive-pack.c
index 62ba6e7a3d014be01fe01ed497c083f7e44e9d34..89792b0a33e76671d594a6e440ba504d4cc3f5c0 100644
(file)
--- a/
builtin/receive-pack.c
+++ b/
builtin/receive-pack.c
@@
-828,8
+828,11
@@
static const char *unpack(int err_fd)
: 0);
hdr_err = parse_pack_header(&hdr);
- if (hdr_err)
+ if (hdr_err) {
+ if (err_fd > 0)
+ close(err_fd);
return hdr_err;
+ }
snprintf(hdr_arg, sizeof(hdr_arg),
"--pack_header=%"PRIu32",%"PRIu32,
ntohl(hdr.hdr_version), ntohl(hdr.hdr_entries));