pidgin: e0a54452: Used byte_stream_destroy(), added in 2e7...

evands at pidgin.im evands at pidgin.im
Thu Apr 24 07:20:58 EDT 2008


-----------------------------------------------------------------
Revision: e0a54452e67fdb966e3989a4b1cf387b5931b96c
Ancestor: 2e791da1fb1cfd6b751a0cef01aa83dc89692051
Author: evands at pidgin.im
Date: 2008-04-24T11:19:26
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e0a54452e67fdb966e3989a4b1cf387b5931b96c

Modified files:
        libpurple/protocols/oscar/flap_connection.c
        libpurple/protocols/oscar/tlv.c

ChangeLog: 

Used byte_stream_destroy(), added in 2e791da1fb1cfd6b751a0cef01aa83dc89692051,
rather than a direct call to g_free(), in the remaining places it was found
for ByteStreams.

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/flap_connection.c	7740afcbe34c79e9d9d086fdbfbfffde24344b39
+++ libpurple/protocols/oscar/flap_connection.c	098ea79fdd811fb96c8dec0b48771b204aaf7a02
@@ -988,7 +988,7 @@ sendframe_flap(FlapConnection *conn, Fla
 	byte_stream_rewind(&bs);
 	flap_connection_send_byte_stream(&bs, conn, bslen);
 
-	g_free(bs.data); /* XXX byte_stream_free */
+	byte_stream_destroy(&bs);
 }
 
 void
============================================================
--- libpurple/protocols/oscar/tlv.c	b8ad3f5ecf81e9f775c0916c62bf8ea5c4720d17
+++ libpurple/protocols/oscar/tlv.c	1f8884b597b2eb9424be5ea9058bdebaa7923e8c
@@ -231,13 +231,13 @@ int aim_tlvlist_cmp(GSList *one, GSList 
 	aim_tlvlist_write(&bs2, &two);
 
 	if (memcmp(bs1.data, bs2.data, bs1.len)) {
-		g_free(bs1.data);
-		g_free(bs2.data);
+		byte_stream_destroy(&bs1);
+		byte_stream_destroy(&bs2);
 		return 1;
 	}
 
-	g_free(bs1.data);
-	g_free(bs2.data);
+	byte_stream_destroy(&bs1);
+	byte_stream_destroy(&bs2);
 
 	return 0;
 }
@@ -445,7 +445,7 @@ int aim_tlvlist_add_chatroom(GSList **li
 
 	len = aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), bs.data);
 
-	g_free(bs.data);
+	byte_stream_destroy(&bs);
 
 	return len;
 }
@@ -494,7 +494,7 @@ int aim_tlvlist_add_frozentlvlist(GSList
 
 	aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), bs.data);
 
-	g_free(bs.data);
+	byte_stream_destroy(&bs);
 
 	return buflen;
 }


More information about the Commits mailing list