aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-12-14 19:34:20 +1030
committerAlan Modra <amodra@gmail.com>2020-12-14 23:36:09 +1030
commit8da4f428d1663541bdd49f5aa2041d06ac6a06de (patch)
tree0fea21e6106460e70e562310ae63984572d7598f /ld/lexsup.c
parent3991c7acb29aa8d7d52150695eb3efa03a08dd50 (diff)
downloadgdb-8da4f428d1663541bdd49f5aa2041d06ac6a06de.zip
gdb-8da4f428d1663541bdd49f5aa2041d06ac6a06de.tar.gz
gdb-8da4f428d1663541bdd49f5aa2041d06ac6a06de.tar.bz2
PR26836, memory leak in parse_args
PR 26836 * lexsup.c (parse_args): Free really_longopts, longopts and shortopts.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 88e33a1..78b1834 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -1699,6 +1699,10 @@ parse_args (unsigned argc, char **argv)
}
}
+ free (really_longopts);
+ free (longopts);
+ free (shortopts);
+
/* Run a couple of checks on the map filename. */
if (config.map_filename)
{