]> Pileus Git - ~andy/gtk/commitdiff
modules/*: Use g_list_free_full() convenience function
authorJavier Jardón <jjardon@gnome.org>
Tue, 3 Jan 2012 01:22:10 +0000 (02:22 +0100)
committerJavier Jardón <jjardon@gnome.org>
Thu, 5 Jan 2012 03:22:43 +0000 (04:22 +0100)
modules/engines/pixbuf/pixbuf-rc-style.c
modules/printbackends/cups/gtkprintbackendcups.c

index a3367c4a0e0e2eed6b075d7cb2ac761c2806b1cd..689965c4dd4ad13a3a08d09f6a03f533cdd43745 100644 (file)
@@ -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);
 }
index 48dec9dbc0c2c6f7d3ee4571c4da01782c59dbfc..c5be26a35d3ed635d41f596a066b51335ad8dae4 100644 (file)
@@ -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;
     }