Skip to content

Commit 12f0fb9

Browse files
pks-tgitster
authored andcommitted
t/helper: fix leaks in proc-receive helper
Fix trivial leaks in the proc-receive helpe. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2f0ee05 commit 12f0fb9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/helper/test-proc-receive.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,12 @@ int cmd__proc_receive(int argc, const char **argv)
196196
packet_flush(1);
197197
sigchain_pop(SIGPIPE);
198198

199+
while (commands) {
200+
struct command *next = commands->next;
201+
free(commands);
202+
commands = next;
203+
}
204+
string_list_clear(&push_options, 0);
205+
199206
return 0;
200207
}

0 commit comments

Comments
 (0)