mirror of
https://github.com/git/git
synced 2024-08-26 19:19:18 +00:00
Merge branch 'jk/receive-pack-deadlocks-with-early-failure' into maint
* jk/receive-pack-deadlocks-with-early-failure: receive-pack: close sideband fd on early pack errors
This commit is contained in:
commit
bd8e3385d5
|
@ -828,8 +828,11 @@ static const char *unpack(int err_fd)
|
||||||
: 0);
|
: 0);
|
||||||
|
|
||||||
hdr_err = parse_pack_header(&hdr);
|
hdr_err = parse_pack_header(&hdr);
|
||||||
if (hdr_err)
|
if (hdr_err) {
|
||||||
|
if (err_fd > 0)
|
||||||
|
close(err_fd);
|
||||||
return hdr_err;
|
return hdr_err;
|
||||||
|
}
|
||||||
snprintf(hdr_arg, sizeof(hdr_arg),
|
snprintf(hdr_arg, sizeof(hdr_arg),
|
||||||
"--pack_header=%"PRIu32",%"PRIu32,
|
"--pack_header=%"PRIu32",%"PRIu32,
|
||||||
ntohl(hdr.hdr_version), ntohl(hdr.hdr_entries));
|
ntohl(hdr.hdr_version), ntohl(hdr.hdr_entries));
|
||||||
|
|
Loading…
Reference in a new issue