diff options
Diffstat (limited to 'binutils/nlmconv.c')
-rw-r--r-- | binutils/nlmconv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c index f45ff5e..eff15c5 100644 --- a/binutils/nlmconv.c +++ b/binutils/nlmconv.c @@ -2082,7 +2082,7 @@ link_inputs (struct string_list *inputs, char *ld, char * mfile) for (q = inputs; q != NULL; q = q->next) ++c; - argv = (char **) alloca ((c + 7) * sizeof (char *)); + argv = (char **) xmalloc ((c + 7) * sizeof (char *)); #ifndef __MSDOS__ if (ld == NULL) @@ -2140,6 +2140,8 @@ link_inputs (struct string_list *inputs, char *ld, char * mfile) pid = pexecute (ld, argv, program_name, (char *) NULL, &errfmt, &errarg, PEXECUTE_SEARCH | PEXECUTE_ONE); + free (argv); + if (pid == -1) { fprintf (stderr, _("%s: execution of %s failed: "), program_name, ld); |