Skip to content

Commit

Permalink
Merge branch 'jk/receive-pack-deadlocks-with-early-failure' into maint
Browse files Browse the repository at this point in the history
* jk/receive-pack-deadlocks-with-early-failure:
  receive-pack: close sideband fd on early pack errors
  • Loading branch information
Junio C Hamano committed Apr 26, 2013
2 parents 30e8180 + 49ecfa1 commit bd8e338
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin/receive-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit bd8e338

Please sign in to comment.