pidgin: 19e86303: account: Don't leak the account->privacy...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Mon Oct 26 00:40:40 EDT 2009
-----------------------------------------------------------------
Revision: 19e86303164a47dd5e9c57b2b637bc9d2dc517b7
Ancestor: bb77e37f1a6a2aa5ebf13ef36d8a440208ec4683
Author: darkrain42 at pidgin.im
Date: 2009-10-26T04:21:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/19e86303164a47dd5e9c57b2b637bc9d2dc517b7
Modified files:
libpurple/account.c
ChangeLog:
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)
-------------- next part --------------
============================================================
--- libpurple/account.c b1da2ac35bb65ceb54d6353b19e3d7721bfbda40
+++ libpurple/account.c 950f40cde484859bc975cf3ffdd1b2bc7b21324c
@@ -1050,6 +1050,16 @@ purple_account_destroy(PurpleAccount *ac
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) {
More information about the Commits
mailing list