diff libpurple/protocols/oscar/tlv.c @ 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 44b4e8bd759b
children 365b90fa23cf
line wrap: on
line diff
--- 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;
 }