receive-pack: avoid minor leak in case start_async() fails
commit5d222c099e38bcf329af544ec42ad3dd0644741c
authorRené Scharfe <l.s.r@web.de>
Tue, 28 Oct 2014 20:27:54 +0000 (28 21:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Oct 2014 21:55:15 +0000 (28 14:55 -0700)
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 <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c