From 044fde0583993fae3ec3c511ac0a5058c5745302 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 13 Apr 2001 21:36:09 +0000 Subject: Plug leaks. * camel-object.c (camel_object_hook_event): * camel-uid-cache.c (camel_uid_cache_get_new_uids): * camel-url.c (camel_url_new_with_base): Plug leaks. * camel-remote-store.c (camel_remote_store_init): Don't re-initialize the folders hash table. * providers/imap/camel-imap-store.c (imap_disconnect): Free authtypes since they'll be re-read on re-connect. (get_folder_info): Free folderinfos that we're discarding from the list. svn path=/trunk/; revision=9302 --- camel/providers/imap/camel-imap-store.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'camel/providers') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 21211616ae..7ff46b9850 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -734,6 +734,13 @@ imap_disconnect (CamelService *service, gboolean clean, CamelException *ex) store->subscribed_folders = NULL; } + if (imap_store->authtypes) { + g_hash_table_foreach_remove (imap_store->authtypes, + free_key, NULL); + g_hash_table_destroy (imap_store->authtypes); + imap_store->authtypes = NULL; + } + if (store->namespace && !(store->parameters & IMAP_PARAM_OVERRIDE_NAMESPACE)) { g_free (store->namespace); store->namespace = NULL; @@ -1148,8 +1155,10 @@ get_folder_info (CamelStore *store, const char *top, gboolean fast, return NULL; if (folders->len) { fi = folders->pdata[0]; - if (!fi->url) + if (!fi->url) { + camel_folder_info_free (fi); g_ptr_array_remove_index (folders, 0); + } } /* If we want to look at only subscribed folders AND -- cgit v1.2.3