X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fdllwrap.c;h=c8cdf843019e88cf8e48f11d7a94d830ea1f9361;hb=5b860c93e3c659625d92a2d2247712a84eac1041;hp=d14d1542c476faaed60483117d5a24b44b2520ee;hpb=6f2750feaf2827ef8a1a0a5b2f90c1e9a6cabbd1;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c index d14d1542c4..c8cdf84301 100644 --- a/binutils/dllwrap.c +++ b/binutils/dllwrap.c @@ -1,5 +1,5 @@ /* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2020 Free Software Foundation, Inc. Contributed by Mumit Khan (khan@xraylith.wisc.edu). This file is part of GNU Binutils. @@ -364,7 +364,7 @@ run (const char *what, char *args) if (*s == ' ') i++; i++; - argv = alloca (sizeof (char *) * (i + 3)); + argv = xmalloc (sizeof (char *) * (i + 3)); i = 0; argv[i++] = what; s = args; @@ -392,6 +392,7 @@ run (const char *what, char *args) pid = pexecute (argv[0], (char * const *) argv, prog_name, temp_base, &errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH); + free (argv); if (pid == -1) {