From a1996600ebb85f98c297fa47122b99fbdf49c6ea Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 12 Apr 2022 16:16:49 -0400 Subject: [PATCH] command-parser: Don't add duplicate command to command list 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 --- src/libply/ply-command-parser.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libply/ply-command-parser.c b/src/libply/ply-command-parser.c index 4fec7fe2..c4cf1036 100644 --- a/src/libply/ply-command-parser.c +++ b/src/libply/ply-command-parser.c @@ -663,8 +663,6 @@ ply_command_parser_get_command_options (ply_command_parser_t *parser, 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 -- 2.47.3