# HG changeset patch # User Evan Schoenberg # Date 1209035966 0 # Node ID da3de0190be23637dbbf1ec6586921ea2443e87f # Parent 979a81468e1969d7703287e515126c7fdb5aa90e Used byte_stream_destroy(), added in 2e791da1fb1cfd6b751a0cef01aa83dc89692051, rather than a direct call to g_free(), in the remaining places it was found for ByteStreams. diff -r 979a81468e19 -r da3de0190be2 libpurple/protocols/oscar/flap_connection.c --- 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 diff -r 979a81468e19 -r da3de0190be2 libpurple/protocols/oscar/tlv.c --- 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; }