# HG changeset patch # User luke@petre.net # Date 1233455016 0 # Node ID cfb3dee41d31f07e73045d34511752ea7c0461f6 # Parent 1cf4ead4119d8085cd3e99fecdd6e3f2b49d5a04 Plug a memory leak in SILC, thanks to Luke Petre. Fixes #8273 committer: Ethan Blanton diff -r 1cf4ead4119d -r cfb3dee41d31 COPYRIGHT --- a/COPYRIGHT Fri Jan 30 22:48:21 2009 +0000 +++ b/COPYRIGHT Sun Feb 01 02:23:36 2009 +0000 @@ -314,6 +314,7 @@ Ted Percival Eduardo Pérez Matt Perry +Luke Petre Diego Petten Nathan Peterson Sebastián E. Peyrott diff -r 1cf4ead4119d -r cfb3dee41d31 ChangeLog --- a/ChangeLog Fri Jan 30 22:48:21 2009 +0000 +++ b/ChangeLog Sun Feb 01 02:23:36 2009 +0000 @@ -13,6 +13,7 @@ * 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 diff -r 1cf4ead4119d -r cfb3dee41d31 libpurple/protocols/silc/silc.c --- a/libpurple/protocols/silc/silc.c Fri Jan 30 22:48:21 2009 +0000 +++ b/libpurple/protocols/silc/silc.c Sun Feb 01 02:23:36 2009 +0000 @@ -1357,6 +1357,7 @@ 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 @@ im->nick, FALSE); if (!clients) goto err; + + free_list = TRUE; } silc_dlist_start(clients); @@ -1413,6 +1416,9 @@ 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);