Simplify e_contact_attr_list_free().
authorMatthew Barnes <mbarnes@redhat.com>
Sat, 24 Nov 2012 02:13:07 +0000 (21:13 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Sat, 24 Nov 2012 02:13:40 +0000 (21:13 -0500)
g_list_free_full() makes it a one-liner.

addressbook/libebook/e-contact.c

index 96f54d3..ca129db 100644 (file)
@@ -2623,8 +2623,7 @@ e_contact_attr_list_copy (GList *list)
 void
 e_contact_attr_list_free (GList *list)
 {
-       g_list_foreach (list, (GFunc)g_free, NULL);
-       g_list_free (list);
+       g_list_free_full (list, (GDestroyNotify) g_free);
 }
 
 typedef GList EContactAttrList;