girepository/girparser: Free the parsed modules list elements

We were removing the modules themselves, but not the list items
This commit is contained in:
Marco Trevisan (Treviño) 2024-05-10 18:10:48 +02:00 committed by Philip Withnall
parent 6e38293fec
commit b59c3f73ee

View File

@ -212,13 +212,10 @@ gi_ir_parser_set_debug (GIIrParser *parser,
void
gi_ir_parser_free (GIIrParser *parser)
{
GList *l;
g_strfreev (parser->includes);
g_strfreev (parser->gi_gir_path);
for (l = parser->parsed_modules; l; l = l->next)
gi_ir_module_free (l->data);
g_clear_list (&parser->parsed_modules, (GDestroyNotify) gi_ir_module_free);
g_slice_free (GIIrParser, parser);
}