ply_command_parser_get_options inexplicably adds a duplicate
command to the list of available subcommands every time it's
called. This must be some sort of cut and paste bug, it shouldn't
be modifying the list.
That leads to double frees when freeing the command parser.
This commit fixes that.
Related: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/175
va_start (args, option_name);
ply_command_parser_get_options_for_command (parser, command, option_name, args);
va_end (args);
-
- ply_list_append_data (parser->available_subcommands, command);
}
static void