im.pidgin.pidgin: 91ae77ce12a4ab3798e303eea54d3bef749d5ca5

khc at pidgin.im khc at pidgin.im
Wed Nov 21 03:35:37 EST 2007


-----------------------------------------------------------------
Revision: 91ae77ce12a4ab3798e303eea54d3bef749d5ca5
Ancestor: 5727e9151416612d63670c49ed8982d3bb1704b4
Author: khc at pidgin.im
Date: 2007-11-21T08:29:33
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/yahoo/yahoo_packet.c

ChangeLog: 

Andrew Gaul fixed another memory leak


-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo_packet.c	33e9440410856401ba5cd9ae3630ef1710b71333
+++ libpurple/protocols/yahoo/yahoo_packet.c	c244807303180494e5d6ccb3531583f930347979
@@ -219,16 +219,15 @@ void yahoo_packet_write(struct yahoo_pac
 
 void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data)
 {
-	GSList *l = pkt->hash;
 	int pos = 0;
 
 	/* This is only called from one place, and the list is
 	 * always backwards */
 
-	l = g_slist_reverse(l);
+	pkt->hash = g_slist_reverse(pkt->hash);
 
-	while (l) {
-		struct yahoo_pair *pair = l->data;
+	while (pkt->hash) {
+		struct yahoo_pair *pair = pkt->hash->data;
 		gchar buf[100];
 
 		g_snprintf(buf, sizeof(buf), "%d", pair->key);
@@ -242,7 +241,7 @@ void yahoo_packet_write(struct yahoo_pac
 		data[pos++] = 0xc0;
 		data[pos++] = 0x80;
 
-		l = l->next;
+		pkt->hash = pkt->hash->next;
 	}
 }
 


More information about the Commits mailing list