Mercurial > pidgin.yaz
changeset 26604:dc05a7128d88
Various libpurple uninit memory cleanups.
Thanks to Nick Hebner
References #8683
committer: Ethan Blanton <elb@pidgin.im>
author | Nick Hebner <hebnern@gmail.com> |
---|---|
date | Thu, 09 Apr 2009 17:38:45 +0000 |
parents | 6b0c6a370cda |
children | 6a3943412f2d |
files | libpurple/account.c libpurple/buddyicon.c libpurple/plugin.c |
diffstat | 3 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/account.c Thu Apr 09 17:36:34 2009 +0000 +++ b/libpurple/account.c Thu Apr 09 17:38:45 2009 +0000 @@ -2787,6 +2787,7 @@ void purple_accounts_uninit(void) { + GList* account; gpointer handle = purple_accounts_get_handle(); if (save_timer != 0) { @@ -2797,4 +2798,10 @@ purple_signals_disconnect_by_handle(handle); purple_signals_unregister_by_instance(handle); + + account = purple_accounts_get_all(); + while (account) { + purple_account_destroy(account->data); + account = g_list_delete_link(account, account); + } }
--- a/libpurple/buddyicon.c Thu Apr 09 17:36:34 2009 +0000 +++ b/libpurple/buddyicon.c Thu Apr 09 17:38:45 2009 +0000 @@ -1299,6 +1299,7 @@ g_hash_table_destroy(icon_file_cache); g_hash_table_destroy(pointer_icon_cache); g_free(old_icons_dir); + g_free(cache_dir); } void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height)
--- a/libpurple/plugin.c Thu Apr 09 17:36:34 2009 +0000 +++ b/libpurple/plugin.c Thu Apr 09 17:38:45 2009 +0000 @@ -1201,6 +1201,11 @@ purple_signals_disconnect_by_handle(handle); purple_signals_unregister_by_instance(handle); + + while (search_paths) { + g_free(search_paths->data); + search_paths = g_list_delete_link(search_paths, search_paths); + } } /**************************************************************************