Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2015-10-24 15:11:27 +0300
committerJunio C Hamano <gitster@pobox.com>2015-11-03 02:01:00 +0300
commit2d71608ec0b6d098ed7c8c914fb7004b28349995 (patch)
tree7f388e56b6831f6afb47ef5b09fa776b40ad3f00 /run-command.h
parenta2558fb8e1e387b630312311e1d22c95663da5d0 (diff)
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 <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h1
1 files changed, 1 insertions, 0 deletions
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 *);