changeset 31073:01a8f82edc45

oscar: Plug two leaks in peer_proxy code ==32109== 41 bytes in 1 blocks are definitely lost in loss record 9,232 of 18,342 ==32109== at 0x4C244E8: malloc (vg_replace_malloc.c:236) ==32109== by 0x90D8534: g_malloc (gmem.c:132) ==32109== by 0x1613A4F0: byte_stream_new (bstream.c:32) ==32109== by 0x1615D3F5: peer_proxy_connection_established_cb (peer_proxy.c:76) ==32109== by 0x93F754B: purple_proxy_connect_data_connected (proxy.c:617) ==32109== by 0x93F7637: socket_ready_cb (proxy.c:676) ==32109== 44 bytes in 1 blocks are definitely lost in loss record 9,263 of 18,342 ==32109== at 0x4C244E8: malloc (vg_replace_malloc.c:236) ==32109== by 0x90D8534: g_malloc (gmem.c:132) ==32109== by 0x1613A4F0: byte_stream_new (bstream.c:32) ==32109== by 0x1615D2E1: peer_proxy_connection_established_cb (peer_proxy.c:112) ==32109== by 0x93F754B: purple_proxy_connect_data_connected (proxy.c:617) ==32109== by 0x93F7637: socket_ready_cb (proxy.c:676)
author Paul Aurich <paul@darkrain42.org>
date Tue, 28 Dec 2010 06:01:41 +0000
parents 9b55bc3e2640
children 6caa1318af63
files libpurple/protocols/oscar/peer_proxy.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/peer_proxy.c	Tue Dec 28 05:57:57 2010 +0000
+++ b/libpurple/protocols/oscar/peer_proxy.c	Tue Dec 28 06:01:41 2010 +0000
@@ -83,6 +83,8 @@
 	byte_stream_putcaps(&frame.payload, conn->type); /* Value */
 
 	peer_proxy_send(conn, &frame);
+
+	byte_stream_destroy(&frame.payload);
 }
 
 /**
@@ -120,6 +122,8 @@
 	byte_stream_putcaps(&frame.payload, conn->type); /* Value */
 
 	peer_proxy_send(conn, &frame);
+
+	byte_stream_destroy(&frame.payload);
 }
 
 /**