# HG changeset patch # User Paul Aurich # Date 1248748665 0 # Node ID 9776f3c0126808de4f201ce313d963026c0a7c03 # Parent 813f2eb3fdc8ed190f6818d492f74c71872d897b# Parent b5e52173ef67ec9b42cbe420a2bd7760ba995396 merge of '5d299fb56a8e77822296cd70281b61ed0fa3b613' and '9c25d032749a8658166756edb40cd7b1a0654efe' diff -r 813f2eb3fdc8 -r 9776f3c01268 ChangeLog --- a/ChangeLog Tue Jul 28 02:30:39 2009 +0000 +++ b/ChangeLog Tue Jul 28 02:37:45 2009 +0000 @@ -10,7 +10,8 @@ in a group on the buddy list. * Removed the unmaintained and unneeded toc protocol plugin. * Fixed NTLM authentication on big-endian systems. - * Various memory cleanups when unloading libpurple. (Nick Hebner) + * Various memory cleanups when unloading libpurple. (Nick Hebner and + Stefan Becker) * Report idle time 'From last message sent' should work properly. * DNS servers are re-read when DNS queries fail in case the system has moved to a new network and the old servers are not accessible. diff -r 813f2eb3fdc8 -r 9776f3c01268 libpurple/accountopt.c --- a/libpurple/accountopt.c Tue Jul 28 02:30:39 2009 +0000 +++ b/libpurple/accountopt.c Tue Jul 28 02:37:45 2009 +0000 @@ -111,6 +111,16 @@ return option; } +static void +purple_account_option_list_free(gpointer data, gpointer user_data) +{ + PurpleKeyValuePair *kvp = data; + + g_free(kvp->value); + g_free(kvp->key); + g_free(kvp); +} + void purple_account_option_destroy(PurpleAccountOption *option) { @@ -127,7 +137,7 @@ { if (option->default_value.list != NULL) { - g_list_foreach(option->default_value.list, (GFunc)g_free, NULL); + g_list_foreach(option->default_value.list, purple_account_option_list_free, NULL); g_list_free(option->default_value.list); } } @@ -183,7 +193,7 @@ if (option->default_value.list != NULL) { - g_list_foreach(option->default_value.list, (GFunc)g_free, NULL); + g_list_foreach(option->default_value.list, purple_account_option_list_free, NULL); g_list_free(option->default_value.list); } diff -r 813f2eb3fdc8 -r 9776f3c01268 libpurple/blist.c --- a/libpurple/blist.c Tue Jul 28 02:30:39 2009 +0000 +++ b/libpurple/blist.c Tue Jul 28 02:37:45 2009 +0000 @@ -2432,6 +2432,9 @@ hb.name = (gchar *)purple_normalize(account, name); for (group = purplebuddylist->root; group; group = group->next) { + if (!group->child) + continue; + hb.group = group; if ((buddy = g_hash_table_lookup(purplebuddylist->buddies, &hb))) { return buddy; @@ -2481,6 +2484,9 @@ hb.account = account; for (node = purplebuddylist->root; node != NULL; node = node->next) { + if (!node->child) + continue; + hb.group = node; if ((buddy = g_hash_table_lookup(purplebuddylist->buddies, &hb)) != NULL) ret = g_slist_prepend(ret, buddy);