receive-pack: avoid minor leak in case start_async() fails
authorRené Scharfe <redacted>
Tue, 28 Oct 2014 20:27:54 +0000 (21:27 +0100)
committerJunio C Hamano <redacted>
Tue, 28 Oct 2014 21:55:15 +0000 (14:55 -0700)
commit5d222c099e38bcf329af544ec42ad3dd0644741c
treeba50aa729f870dbb5d0dc914843161a363599528
parentb9459019bbb7b864cf59fa307953834996ab4dbe
receive-pack: avoid minor leak in case start_async() fails

If the asynchronous start of copy_to_sideband() fails, then any
env_array entries added to struct child_process proc by
prepare_push_cert_sha1() are leaked.  Call the latter function only
after start_async() succeeded so that the allocated entries are
cleaned up automatically by start_command() or finish_command().

Signed-off-by: Rene Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/receive-pack.c
git clone https://git.99rst.org/PROJECT