libpurple/protocols/jabber/roster.c

changeset 40052
cc03b5af25ea
parent 39915
7b19c6362c4e
child 40079
a37a1e349491
--- a/libpurple/protocols/jabber/roster.c	Tue Oct 15 04:05:27 2019 +0000
+++ b/libpurple/protocols/jabber/roster.c	Wed Oct 16 01:06:17 2019 +0300
@@ -94,14 +94,11 @@
 
 static void remove_purple_buddies(JabberStream *js, const char *jid)
 {
-	GSList *buddies, *l;
+	GSList *buddies;
 
 	buddies = purple_blist_find_buddies(purple_connection_get_account(js->gc), jid);
 
-	for(l = buddies; l; l = l->next)
-		purple_blist_remove_buddy(l->data);
-
-	g_slist_free(buddies);
+	g_slist_free_full(buddies, (GDestroyNotify)purple_blist_remove_buddy);
 }
 
 static void add_purple_buddy_to_groups(JabberStream *js, const char *jid,

mercurial