aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-store.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 7db3b2b9d8..ab8e2574e3 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,11 @@
2001-10-29 Dan Winship <danw@ximian.com>
+ * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
+ free the hash table key if the folder wasn't found in the hash
+ table. I'm not sure where the bug is/was that made it possible to
+ add a folder to the tree after creating it failed, but now if that
+ happens, it won't crash if you try to delete it again. (#11492)
+
* camel-disco-store.c (camel_disco_store_status): if the service
is being connected and thinks it's online, but the session is
offline, then mark the service offline as well. Fixes 13683.
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index f429ef6a76..5e7cd62bf6 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1757,10 +1757,11 @@ unsubscribe_folder (CamelStore *store, const char *folder_name,
return;
camel_imap_response_free (imap_store, response);
- g_hash_table_lookup_extended (imap_store->subscribed_folders,
- folder_name, &key, &value);
- g_hash_table_remove (imap_store->subscribed_folders, folder_name);
- g_free (key);
+ if (g_hash_table_lookup_extended (imap_store->subscribed_folders,
+ folder_name, &key, &value)) {
+ g_hash_table_remove (imap_store->subscribed_folders, key);
+ g_free (key);
+ }
name = strrchr (folder_name, imap_store->dir_sep);
if (name)