1
0
mirror of https://github.com/mirror/wget.git synced 2025-03-25 09:10:13 +08:00

* src/main.c (main): Remove use of alloca

This commit is contained in:
Tim Rühsen 2020-02-13 15:17:27 +01:00
parent c0d8cceb93
commit f460e1d049

View File

@ -1934,7 +1934,7 @@ for details.\n\n"));
set_progress_implementation (opt.progress_type);
/* Fill in the arguments. */
url = alloca_array (char *, nurl + 1);
url = xmalloc (sizeof (char *) * (nurl + 1));
if (url == NULL)
{
fprintf (stderr, _("Memory allocation problem\n"));
@ -1946,7 +1946,7 @@ for details.\n\n"));
if (rewritten)
url[i] = rewritten;
else
url[i] = xstrdup (argv[optind]);
url[i] = argv[optind];
}
url[i] = NULL;
@ -2180,6 +2180,8 @@ only if outputting to a regular file.\n"));
iri_free (iri);
}
xfree(url);
/* And then from the input file, if any. */
if (opt.input_filename)
{