aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-10-30 02:31:40 +0800
committerDan Winship <danw@src.gnome.org>2001-10-30 02:31:40 +0800
commit8d4283d6fc2301e01cc963fd797fc8c5a2217ea6 (patch)
tree1876c13b86aea3a33f1384991afcb30f25534cb3 /camel
parentd725eacdbc6eefb19791a10cf838d7db9359b04d (diff)
downloadgsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.tar
gsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.tar.gz
gsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.tar.bz2
gsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.tar.lz
gsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.tar.xz
gsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.tar.zst
gsoc2013-evolution-8d4283d6fc2301e01cc963fd797fc8c5a2217ea6.zip
Don't free the hash table key if the folder wasn't found in the hash
* 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) svn path=/trunk/; revision=14348
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)