diff -r 94cb5cc3862a -r 16b440d4ab36 pidgin/plugins/gevolution/add_buddy_dialog.c --- a/pidgin/plugins/gevolution/add_buddy_dialog.c Tue Oct 01 01:38:40 2019 +0000 +++ b/pidgin/plugins/gevolution/add_buddy_dialog.c Tue Oct 01 01:38:06 2019 -0400 @@ -45,11 +45,7 @@ { gtk_widget_destroy(dialog->win); - if (dialog->contacts != NULL) - { - g_list_foreach(dialog->contacts, (GFunc)g_object_unref, NULL); - g_list_free(dialog->contacts); - } + g_list_free_full(dialog->contacts, g_object_unref); if (dialog->book != NULL) g_object_unref(dialog->book); @@ -224,8 +220,7 @@ if (pixbuf != NULL) g_object_unref(G_OBJECT(pixbuf)); - g_list_foreach(list, (GFunc)g_free, NULL); - g_list_free(list); + g_list_free_full(list, g_free); } static void @@ -245,8 +240,7 @@ if (dialog->contacts != NULL) { - g_list_foreach(dialog->contacts, (GFunc)g_object_unref, NULL); - g_list_free(dialog->contacts); + g_list_free_full(dialog->contacts, g_object_unref); dialog->contacts = NULL; }