pidgin: f5802998: Plug a memory leak in SILC, thanks to Lu...

elb at pidgin.im elb at pidgin.im
Sat Jan 31 21:25:22 EST 2009


-----------------------------------------------------------------
Revision: f580299840f7a33175c94be79f7b1997fa75001b
Ancestor: 0034db582346caf9ea549c58c6df3728cccc69ed
Author: luke at petre.net
Date: 2009-02-01T02:23:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f580299840f7a33175c94be79f7b1997fa75001b

Modified files:
        COPYRIGHT ChangeLog libpurple/protocols/silc/silc.c

ChangeLog: 

Plug a memory leak in SILC, thanks to Luke Petre.

Fixes #8273

-------------- next part --------------
============================================================
--- COPYRIGHT	15484f66a1e90dce36f445fc492c9a9c33fdd002
+++ COPYRIGHT	ae5392f14789982816433d4afed2a6a746a36dd7
@@ -314,6 +314,7 @@ Matt Perry
 Ted Percival
 Eduardo P?rez
 Matt Perry
+Luke Petre
 Diego Petten
 Nathan Peterson
 Sebasti?n E. Peyrott
============================================================
--- ChangeLog	e35efc6838f3a38136d9428765641279e2220508
+++ ChangeLog	ef07e3f9aff592b2524ec931e6307efb997bf872
@@ -13,6 +13,7 @@ version 2.5.5 (??/??/????):
 	* Fix retrieval of ICQ status messages from users of ICQ 6.x, Miranda,
 	  and other libpurple clients (fixes with libpurple users only on
 	  statuses other than Available). (Daniel Ljungborg)
+	* Fix a memory leak in SILC. (Luke Petre)
 
 	Finch:
 	* Allow rebinding keys to change the focused widget (details in the
============================================================
--- libpurple/protocols/silc/silc.c	ec27b9d2305549d9aa39f8c4c54124177e80a088
+++ libpurple/protocols/silc/silc.c	b487c411773007c7da65ac1f1efe972c04adefc1
@@ -1357,6 +1357,7 @@ silcpurple_send_im_resolved(SilcClient c
 	char tmp[256];
 	SilcClientEntry client_entry;
 	SilcDList list;
+	gboolean free_list = FALSE;
 
 	convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, im->nick,
 						      sg->account);
@@ -1373,6 +1374,8 @@ silcpurple_send_im_resolved(SilcClient c
 							im->nick, FALSE);
 		if (!clients)
 			goto err;
+
+		free_list = TRUE;
 	}
 
 	silc_dlist_start(clients);
@@ -1413,6 +1416,9 @@ silcpurple_send_im_resolved(SilcClient c
 	purple_conversation_write(convo, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
 
  out:
+	if (free_list) {
+		silc_client_list_free(client, conn, clients);
+	}
 	g_free(im->nick);
 	g_free(im->message);
 	silc_free(im);


More information about the Commits mailing list