From: Patrick Steinhardt Date: Mon, 30 Sep 2024 09:14:16 +0000 (+0200) Subject: t/helper: fix leaks in proc-receive helper X-Git-Tag: v2.48.0-rc0~126^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12f0fb953891940598486bdbe8edd28b05b38278;p=thirdparty%2Fgit.git t/helper: fix leaks in proc-receive helper Fix trivial leaks in the proc-receive helpe. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/t/helper/test-proc-receive.c b/t/helper/test-proc-receive.c index 29361c7aab..3703f734f3 100644 --- a/t/helper/test-proc-receive.c +++ b/t/helper/test-proc-receive.c @@ -196,5 +196,12 @@ int cmd__proc_receive(int argc, const char **argv) packet_flush(1); sigchain_pop(SIGPIPE); + while (commands) { + struct command *next = commands->next; + free(commands); + commands = next; + } + string_list_clear(&push_options, 0); + return 0; }