t/helper: fix leaks in proc-receive helper

Fix trivial leaks in the proc-receive helpe. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Sep 30, 2024 at 11:14 UTC 12f0fb953891940598486bdbe8edd28b05b38278
1 file changed +7
t/helper/test-proc-receive.c
+7
@@ -196,5 +196,12 @@ int cmd__proc_receive(int argc, const char **argv)
196 packet_flush(1);
197 sigchain_pop(SIGPIPE);
198
199 + while (commands) {
200 + struct command *next = commands->next;
201 + free(commands);
202 + commands = next;
203 + }
204 + string_list_clear(&push_options, 0);
205 +
206 return 0;
207 }