]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/helper: fix leaks in proc-receive helper
authorPatrick Steinhardt <ps@pks.im>
Mon, 30 Sep 2024 09:14:16 +0000 (11:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Sep 2024 18:23:08 +0000 (11:23 -0700)
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>
t/helper/test-proc-receive.c

index 29361c7aab72760b600684e3b5ef28b2a9168c23..3703f734f3b125e1fc78d27678199f37d1af3a54 100644 (file)
@@ -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;
 }