summaryrefslogtreecommitdiff
path: root/sub-process.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-07 07:27:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-07 07:27:54 (GMT)
commit98c03a0de83f5b5a98ac25d5639f647559c0e619 (patch)
treec28f2bc0c760defc3fc39f5c6768100072bd2adc /sub-process.c
parentcfa0fd0ffc7ae5edcef0615e49b995f3699c07eb (diff)
parent2944a94c6b74d3941f63d1f4eee5bdfbbf5cd400 (diff)
downloadgit-98c03a0de83f5b5a98ac25d5639f647559c0e619.zip
git-98c03a0de83f5b5a98ac25d5639f647559c0e619.tar.gz
git-98c03a0de83f5b5a98ac25d5639f647559c0e619.tar.bz2
Merge branch 'tg/memfixes'
Fixes for a handful memory access issues identified by valgrind. * tg/memfixes: sub-process: use child_process.args instead of child_process.argv http-push: fix construction of hex value from path path.c: fix uninitialized memory access
Diffstat (limited to 'sub-process.c')
-rw-r--r--sub-process.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sub-process.c b/sub-process.c
index 6dde506..8d2a170 100644
--- a/sub-process.c
+++ b/sub-process.c
@@ -77,13 +77,12 @@ int subprocess_start(struct hashmap *hashmap, struct subprocess_entry *entry, co
{
int err;
struct child_process *process;
- const char *argv[] = { cmd, NULL };
entry->cmd = cmd;
process = &entry->process;
child_process_init(process);
- process->argv = argv;
+ argv_array_push(&process->args, cmd);
process->use_shell = 1;
process->in = -1;
process->out = -1;