X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=binutils%2Fdllwrap.c;h=c8cdf843019e88cf8e48f11d7a94d830ea1f9361;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=e60126e5154518f4e8181b86d1d2b0963c2a3b68;hpb=3aade68889268c7d15e121d6d63cb1b753ec12fa;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c index e60126e515..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-2015 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) {