Commit d6df811e by Daniel van Gerpen Committed by Jeff Law

argv.c (expandargv): Fix memory leak for expanded arguments.

       * argv.c (expandargv): Fix memory leak for expanded
        arguments.

From-SVN: r259775
parent 98c2d5ae
2018-04-30 Daniel van Gerpen <daniel@vangerpen.de>
* argv.c (expandargv): Fix memory leak for copied argv.
2018-04-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR lto/81968
......
......@@ -455,6 +455,8 @@ expandargv (int *argcp, char ***argvp)
file_argc = 0;
while (file_argv[file_argc])
++file_argc;
/* Free the original option's memory. */
free ((*argvp)[i]);
/* Now, insert FILE_ARGV into ARGV. The "+1" below handles the
NULL terminator at the end of ARGV. */
*argvp = ((char **)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment