Skip to content

Commit d5d5295

Browse files
committed
Merge branch 'rs/run-command-use-alloc-array'
Code clean-up. * rs/run-command-use-alloc-array: run-command: use ALLOC_ARRAY
2 parents 6551e69 + 0e187d7 commit d5d5295

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run-command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static char **prep_childenv(const char *const *deltaenv)
452452
}
453453

454454
/* Create an array of 'char *' to be used as the childenv */
455-
childenv = xmalloc((env.nr + 1) * sizeof(char *));
455+
ALLOC_ARRAY(childenv, env.nr + 1);
456456
for (i = 0; i < env.nr; i++)
457457
childenv[i] = env.items[i].util;
458458
childenv[env.nr] = NULL;

0 commit comments

Comments
 (0)