Mercurial > pidgin
changeset 28442:e0223ad82ca1
account: Don't leak the account->privacy / account->deny lists.
Multiple similar to:
==21150== 412 (32 direct, 380 indirect) bytes in 2 blocks are definitely lost in loss record 12,416 of 13,348
==21150== at 0x4C221A7: malloc (vg_replace_malloc.c:195)
==21150== by 0x90AA552: g_malloc (gmem.c:131)
==21150== by 0x90C03C7: g_slice_alloc (gslice.c:824)
==21150== by 0x90C0E05: g_slist_append (gslist.c:117)
==21150== by 0x93AE56F: purple_privacy_permit_add (privacy.c:58)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 26 Oct 2009 04:21:28 +0000 |
parents | ac1ad1fa5ecf |
children | 342c05db42dd |
files | libpurple/account.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/account.c Mon Oct 26 03:59:55 2009 +0000 +++ b/libpurple/account.c Mon Oct 26 04:21:28 2009 +0000 @@ -1050,6 +1050,16 @@ if(account->system_log) purple_log_free(account->system_log); + while (account->deny) { + g_free(account->deny->data); + account->deny = g_slist_delete_link(account->deny, account->deny); + } + + while (account->permit) { + g_free(account->permit->data); + account->permit = g_slist_delete_link(account->permit, account->permit); + } + priv = PURPLE_ACCOUNT_GET_PRIVATE(account); PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error); if (priv->current_error) {