From: Jon Simons Date: Wed, 14 Oct 2026 03:13:40 GMT Subject: [PATCH v2 05/12] send-pack: plug leak upon match_push_refs failure Message-ID: <20261014031347.50433-6-jon@jonsimons.org> In-Reply-To: <20261014031347.50433-1-jon@jonsimons.org> Otherwise memory leak tests will flag the missing finish_connect(). Signed-off-by: Jon Simons --- builtin/send-pack.c | 3 +++ 1 file changed, 3 insertions(+) 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; + close(fd[1]); + close(fd[0]); + finish_connect(conn); goto cleanup; } if (!is_empty_cas(&cas)) -- 2.55.0