From 2d71608ec0b6d098ed7c8c914fb7004b28349995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sat, 24 Oct 2015 14:11:27 +0200 Subject: run-command: factor out child_process_clear() Avoid duplication by moving the code to release allocated memory for arguments and environment to its own function, child_process_clear(). Export it to provide a counterpart to child_process_init(). Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- run-command.h | 1 + 1 file changed, 1 insertion(+) (limited to 'run-command.h') diff --git a/run-command.h b/run-command.h index 263b9662ad..c850a57ea6 100644 --- a/run-command.h +++ b/run-command.h @@ -47,6 +47,7 @@ struct child_process { #define CHILD_PROCESS_INIT { NULL, ARGV_ARRAY_INIT, ARGV_ARRAY_INIT } void child_process_init(struct child_process *); +void child_process_clear(struct child_process *); int start_command(struct child_process *); int finish_command(struct child_process *); -- cgit v1.2.1