pidgin: 710538e3: some memleak fixes from Andrew Gaul agai...

andrew at gaul.org andrew at gaul.org
Sun Mar 9 17:40:43 EDT 2008


-----------------------------------------------------------------
Revision: 710538e38a278bc2f3c23d469ada0ab005d34c17
Ancestor: adf75e16803f48adaeb629054074f52e928b0792
Author: andrew at gaul.org
Date: 2008-03-09T21:34:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/710538e38a278bc2f3c23d469ada0ab005d34c17

Modified files:
        libpurple/protocols/irc/dcc_send.c
        libpurple/protocols/oscar/oscar.c pidgin/gtkft.c

ChangeLog: 

some memleak fixes from Andrew Gaul again:

==9002== 12 bytes in 1 blocks are definitely lost in loss record 19 of 229
==9002==    at 0x4006A6E: malloc (vg_replace_malloc.c:207)
==9002==    by 0xA1CAF5: g_malloc (in /lib/libglib-2.0.so.0.1400.6)
==9002==    by 0xA35348: g_strdup (in /lib/libglib-2.0.so.0.1400.6)
==9002==    by 0x4FD826F: oscar_format_screenname (oscar.c:6227)
==9002==    by 0x4FD0C46: purple_bosrights (oscar.c:3632)

==7413== 4 bytes in 1 blocks are definitely lost in loss record 3 of 233
==7413==    at 0x4004B22: calloc (vg_replace_malloc.c:397)
==7413==    by 0xA1CA5D: g_malloc0 (in /lib/libglib-2.0.so.0.1400.6)
==7413==    by 0x5018159: irc_dccsend_recv (dcc_send.c:116)

==7413== 98 bytes in 9 blocks are definitely lost in loss record 91 of 233
==7413==    at 0x4006A6E: malloc (vg_replace_malloc.c:207)
==7413==    by 0x234888A: vasprintf (in /lib/libc-2.7.so)
==7413==    by 0xA44996: g_vasprintf (in /lib/libglib-2.0.so.0.1400.6)
==7413==    by 0xA35485: g_strdup_vprintf (in /lib/libglib-2.0.so.0.1400.6)
==7413==    by 0xA354AA: g_strdup_printf (in /lib/libglib-2.0.so.0.1400.6)
==7413==    by 0x45E68DB: purple_str_size_to_units (util.c:3320)
==7413==    by 0x80A9D19: pidgin_xfer_dialog_update_xfer (gtkft.c:1058)


-------------- next part --------------
============================================================
--- libpurple/protocols/irc/dcc_send.c	141d56c9ad3855c495ae5724a638326015d70571
+++ libpurple/protocols/irc/dcc_send.c	703f20f036d69388d9a1edf91f2acbeeb1bf9242
@@ -135,7 +135,7 @@ void irc_dccsend_recv(struct irc_conn *i
 		
 		purple_xfer_set_end_fnc(xfer, irc_dccsend_recv_destroy);
 		purple_xfer_set_request_denied_fnc(xfer, irc_dccsend_recv_destroy);
-		purple_xfer_set_cancel_send_fnc(xfer, irc_dccsend_recv_destroy);
+		purple_xfer_set_cancel_recv_fnc(xfer, irc_dccsend_recv_destroy);
 		
 		purple_xfer_request(xfer);
 	}
============================================================
--- libpurple/protocols/oscar/oscar.c	49ab59d0e34a8459f99e958a723d119620a55f6c
+++ libpurple/protocols/oscar/oscar.c	f89e06a30cea6cde4263298c1e5440e39597e43e
@@ -6230,6 +6230,7 @@ static void oscar_format_screenname(Purp
 	if (!aim_sncmp(purple_account_get_username(purple_connection_get_account(gc)), nick)) {
 		if (!flap_connection_getbytype(od, SNAC_FAMILY_ADMIN)) {
 			od->setnick = TRUE;
+			g_free(od->newsn);
 			od->newsn = g_strdup(nick);
 			aim_srv_requestnew(od, SNAC_FAMILY_ADMIN);
 		} else {
============================================================
--- pidgin/gtkft.c	dd5b2d29d17f2c51474ca3344fbb7da83658f3f1
+++ pidgin/gtkft.c	dde0b11d8eaa7510cc3260f9b44c9587e7790fe9
@@ -1064,6 +1064,9 @@ pidgin_xfer_dialog_update_xfer(PidginXfe
 					   COLUMN_REMAINING, remaining_str,
 					   -1);
 
+	g_free(size_str);
+	g_free(remaining_str);
+
 	if (purple_xfer_is_completed(xfer))
 	{
 		GdkPixbuf *pixbuf;


More information about the Commits mailing list