projects
/
external
/
binutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* argv.c (expandargv): Fix memory leak for expanded arguments.
[external/binutils.git]
/
libiberty
/
argv.c
diff --git
a/libiberty/argv.c
b/libiberty/argv.c
index
4f66c89
..
8ead947
100644
(file)
--- a/
libiberty/argv.c
+++ b/
libiberty/argv.c
@@
-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 **)