commit | d5d5295e0ad3a05b85f36462be5835a40b2fb75c | [log] [tgz] |
---|---|---|
author | Junio C Hamano <gitster@pobox.com> | Thu Oct 05 13:48:20 2017 +0900 |
committer | Junio C Hamano <gitster@pobox.com> | Thu Oct 05 13:48:20 2017 +0900 |
tree | 0f9a0bcc0fb6a45ded00b66d9fb0fbd9a499e69f | |
parent | 6551e69fd458766a22f6929fa46ac3197d6a3267 [diff] | |
parent | 0e187d758cd4ad0f929b90b04adee7ec19f7fc93 [diff] |
Merge branch 'rs/run-command-use-alloc-array' Code clean-up. * rs/run-command-use-alloc-array: run-command: use ALLOC_ARRAY
diff --git a/run-command.c b/run-command.c index b5e6eb3..014b216 100644 --- a/run-command.c +++ b/run-command.c
@@ -452,7 +452,7 @@ } /* Create an array of 'char *' to be used as the childenv */ - childenv = xmalloc((env.nr + 1) * sizeof(char *)); + ALLOC_ARRAY(childenv, env.nr + 1); for (i = 0; i < env.nr; i++) childenv[i] = env.items[i].util; childenv[env.nr] = NULL;