From 6ad6f719c6b2fc7cf797c86b406f4e61d9fca4d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Tue, 3 Jan 2012 02:22:10 +0100 Subject: [PATCH] modules/*: Use g_list_free_full() convenience function --- modules/engines/pixbuf/pixbuf-rc-style.c | 3 +-- modules/printbackends/cups/gtkprintbackendcups.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/engines/pixbuf/pixbuf-rc-style.c b/modules/engines/pixbuf/pixbuf-rc-style.c index a3367c4a0..689965c4d 100644 --- a/modules/engines/pixbuf/pixbuf-rc-style.c +++ b/modules/engines/pixbuf/pixbuf-rc-style.c @@ -184,8 +184,7 @@ pixbuf_rc_style_finalize (GObject *object) { PixbufRcStyle *rc_style = PIXBUF_RC_STYLE (object); - g_list_foreach (rc_style->img_list, (GFunc) theme_image_unref, NULL); - g_list_free (rc_style->img_list); + g_list_free_full (rc_style->img_list, theme_image_unref); G_OBJECT_CLASS (parent_class)->finalize (object); } diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index 48dec9dbc..c5be26a35 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -2108,8 +2108,7 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend, as inactive if it is in the list, emitting a printer_removed signal */ if (removed_printer_checklist != NULL) { - g_list_foreach (removed_printer_checklist, (GFunc) mark_printer_inactive, backend); - g_list_free (removed_printer_checklist); + g_list_free_full (removed_printer_checklist, (GDestroyNotify) mark_printer_inactive); list_has_changed = TRUE; } -- 2.43.2