Mercurial > pidgin.yaz
diff libpurple/protocols/silc/silc.c @ 25043:cfb3dee41d31
Plug a memory leak in SILC, thanks to Luke Petre.
Fixes #8273
committer: Ethan Blanton <elb@pidgin.im>
author | luke@petre.net |
---|---|
date | Sun, 01 Feb 2009 02:23:36 +0000 |
parents | 4a4f733c4bf1 |
children | b5c82724598c |
line wrap: on
line diff
--- 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);