[PATCH 21/23] t/helper: fix leaks in proc-receive helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix trivial leaks in the proc-receive helpe.

Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
---
 t/helper/test-proc-receive.c | 7 +++++++
 1 file changed, 7 insertions(+)

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;
 }
-- 
2.46.2.852.g229c0bf0e5.dirty





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux