Re: [PATCH v2 05/12] send-pack: plug leak upon match_push_refs failure
Jon Simons <jon@jonsimons.org> writes:
Show 6 quoted lines
> Otherwise memory leak tests will flag the missing finish_connect().
>
> Signed-off-by: Jon Simons <jon@jonsimons.org>
> ---
> builtin/send-pack.c | 3 +++
> 1 file changed, 3 insertions(+)
Show 9 quoted lines
>
> diff --git a/builtin/send-pack.c b/builtin/send-pack.c
> index d6cdbae472..4e6a45ba30 100644
> --- a/builtin/send-pack.c
> +++ b/builtin/send-pack.c
> @@ -311,6 +311,9 @@ int cmd_send_pack(int argc,
> /* match them up */
> if (match_push_refs(local_refs, &remote_refs, &rs, flags)) {
> ret = -1;Show 6 quoted lines
> + close(fd[1]);
> + close(fd[0]);
> + finish_connect(conn);
> goto cleanup;
> }
> if (!is_empty_cas(&cas))