changeset 22718:da3de0190be2

Used byte_stream_destroy(), added in 2e791da1fb1cfd6b751a0cef01aa83dc89692051, rather than a direct call to g_free(), in the remaining places it was found for ByteStreams.
author Evan Schoenberg <evan.s@dreskin.net>
date Thu, 24 Apr 2008 11:19:26 +0000
parents 979a81468e19
children 6f5f0a4de7f4
files libpurple/protocols/oscar/flap_connection.c libpurple/protocols/oscar/tlv.c
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/flap_connection.c	Thu Apr 24 11:10:03 2008 +0000
+++ b/libpurple/protocols/oscar/flap_connection.c	Thu Apr 24 11:19:26 2008 +0000
@@ -988,7 +988,7 @@
 	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
--- a/libpurple/protocols/oscar/tlv.c	Thu Apr 24 11:10:03 2008 +0000
+++ b/libpurple/protocols/oscar/tlv.c	Thu Apr 24 11:19:26 2008 +0000
@@ -231,13 +231,13 @@
 	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 @@
 
 	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 @@
 
 	aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), bs.data);
 
-	g_free(bs.data);
+	byte_stream_destroy(&bs);
 
 	return buflen;
 }