Use free_full on GList's instead of foreach + free

GList's used in legacy code were free'd using a g_list_foreach + g_list_free,
while we can just use g_list_free_full as per GLib 2.28.

So replace code where we were using this legacy codepath.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/576
This commit is contained in:
Marco Trevisan (Treviño)
2019-05-15 13:56:06 -05:00
parent 9e82f9af25
commit df7d8e2cbf
7 changed files with 11 additions and 31 deletions

View File

@ -2021,8 +2021,7 @@ add_children (ClutterScript *script,
clutter_container_add_actor (container, CLUTTER_ACTOR (object));
}
g_list_foreach (oinfo->children, (GFunc) g_free, NULL);
g_list_free (oinfo->children);
g_list_free_full (oinfo->children, g_free);
oinfo->children = unresolved;
}