diff options
Diffstat (limited to 'binutils/resrc.c')
-rw-r--r-- | binutils/resrc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/resrc.c b/binutils/resrc.c index 0cfd949..b6e320d 100644 --- a/binutils/resrc.c +++ b/binutils/resrc.c @@ -215,7 +215,7 @@ run_cmd (char *cmd, const char *redir) i++; i++; - argv = alloca (sizeof (char *) * (i + 3)); + argv = xmalloc (sizeof (char *) * (i + 3)); i = 0; s = cmd; @@ -266,6 +266,7 @@ run_cmd (char *cmd, const char *redir) pid = pexecute (argv[0], (char * const *) argv, program_name, temp_base, &errmsg_fmt, &errmsg_arg, PEXECUTE_ONE | PEXECUTE_SEARCH); + free (argv); /* Restore stdout to its previous setting. */ dup2 (stdout_save, STDOUT_FILENO); |