im.pidgin.pidgin: f8476716fbd7f56dd6fe9fd371a8f5429b12d483

datallah at pidgin.im datallah at pidgin.im
Tue Oct 9 17:30:47 EDT 2007


-----------------------------------------------------------------
Revision: f8476716fbd7f56dd6fe9fd371a8f5429b12d483
Ancestor: b219fc7a61d692d47953984814f7b4d882f20291
Author: datallah at pidgin.im
Date: 2007-10-09T21:27:29
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/jabber/roster.c

ChangeLog: 

Fix CID 312 (Dead code).

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/roster.c	deb365dab00fc7f261eda9ac73b9309c1af0b8a6
+++ libpurple/protocols/jabber/roster.c	f9eb1e8c18fbec6fbbae94a91fb88d6b7f647216
@@ -403,12 +403,12 @@ void jabber_roster_remove_buddy(PurpleCo
 void jabber_roster_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy,
 		PurpleGroup *group) {
 	GSList *buddies = purple_find_buddies(gc->account, buddy->name);
-	GSList *groups = NULL;
 
 	buddies = g_slist_remove(buddies, buddy);
 	if(buddies != NULL) {
 		PurpleBuddy *tmpbuddy;
 		PurpleGroup *tmpgroup;
+		GSList *groups = NULL;
 
 		while(buddies) {
 			tmpbuddy = buddies->data;
@@ -418,6 +418,7 @@ void jabber_roster_remove_buddy(PurpleCo
 		}
 
 		jabber_roster_update(gc->proto_data, buddy->name, groups);
+		g_slist_free(groups);
 	} else {
 		JabberIq *iq = jabber_iq_new_query(gc->proto_data, JABBER_IQ_SET,
 				"jabber:iq:roster");
@@ -429,9 +430,4 @@ void jabber_roster_remove_buddy(PurpleCo
 
 		jabber_iq_send(iq);
 	}
-
-	if(buddies)
-		g_slist_free(buddies);
-	if(groups)
-		g_slist_free(groups);
 }


More information about the Commits mailing list