PR26836, memory leak in parse_args

PR 26836
	* lexsup.c (parse_args): Free really_longopts, longopts and
	shortopts.
This commit is contained in:
Alan Modra 2020-12-14 19:34:20 +10:30
parent 3991c7acb2
commit 8da4f428d1
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2020-12-14 Alan Modra <amodra@gmail.com>
PR 26836
* lexsup.c (parse_args): Free really_longopts, longopts and
shortopts.
2020-12-14 Nick Clifton <nickc@redhat.com>
PR 27050

View file

@ -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)
{