When a new switch is defined with a specific name for its parameter, that name is not freed. This is a minor leak, since such switches are in general defined once at the beginning of the program, and never modified afterwards. Detected with valgrind.
Tested on x86_64-pc-linux-gnu, committed on trunk 2016-06-16 Emmanuel Briot <br...@adacore.com> * g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
Index: g-comlin.adb =================================================================== --- g-comlin.adb (revision 237429) +++ g-comlin.adb (working copy) @@ -3073,6 +3073,7 @@ Free (Config.Switches (S).Long_Switch); Free (Config.Switches (S).Help); Free (Config.Switches (S).Section); + Free (Config.Switches (S).Argument); end loop; Unchecked_Free (Config.Switches);