Call xmalloc before realloc

This commit is contained in:
Eric Andersen 2001-11-19 10:49:30 +00:00
parent 43626d7671
commit d81891a2e6

View File

@ -50,6 +50,7 @@ int xargs_main(int argc, char **argv)
/* concatenate all the arguments passed to xargs together */
int i;
int len = 1; /* for the '\0' */
cmd_to_be_executed = xmalloc(80);
for (i = 1; i < argc; i++) {
len += strlen(argv[i]);
len += 1; /* for the space between the args */