Commit e7f0a4d1 authored by Corentin Noël's avatar Corentin Noël Committed by Alberto Fanjul

gladeui: fix memory leak in GWActionClass

parent e1af8a18
Pipeline #72448 passed with stages
in 3 minutes and 8 seconds
...@@ -342,13 +342,15 @@ void ...@@ -342,13 +342,15 @@ void
glade_widget_action_class_free (GWActionClass *action) glade_widget_action_class_free (GWActionClass *action)
{ {
if (action->actions) if (action->actions)
g_list_foreach (action->actions, (GFunc) glade_widget_action_class_free, {
NULL); g_list_free_full (action->actions, (GDestroyNotify) glade_widget_action_class_free);
action->actions = NULL;
}
/* Dont free id since it points into path directly */ /* Dont free id since it points into path directly */
g_free (action->path); g_clear_pointer (&action->path, g_free);
g_free (action->label); g_clear_pointer (&action->label, g_free);
g_free (action->stock); g_clear_pointer (&action->stock, g_free);
g_slice_free (GWActionClass, action); g_slice_free (GWActionClass, action);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment