mirror of
https://github.com/brl/mutter.git
synced 2025-07-23 01:51:38 +00:00
Use free_full on GSList's instead of foreach + free
GList's used in legacy code were free'd using a g_slist_foreach + g_slist_free, while we can just use g_slist_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:
@ -249,10 +249,7 @@ utf8_fputs (const char *str,
|
||||
void
|
||||
meta_free_gslist_and_elements (GSList *list_to_deep_free)
|
||||
{
|
||||
g_slist_foreach (list_to_deep_free,
|
||||
(void (*)(gpointer,gpointer))&g_free, /* ew, for ugly */
|
||||
NULL);
|
||||
g_slist_free (list_to_deep_free);
|
||||
g_slist_free_full (list_to_deep_free, g_free);
|
||||
}
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
|
Reference in New Issue
Block a user