aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine/mail-folder-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'libemail-engine/mail-folder-cache.c')
-rw-r--r--libemail-engine/mail-folder-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index d6bb1e5e30..f5d49a3ca7 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -386,7 +386,8 @@ store_info_insert_folder_info (StoreInfo *store_info,
folder_info_ht = store_info->folder_info_ht;
- g_hash_table_insert (
+ /* Replace both key and value, because the key gets freed as soon as the value */
+ g_hash_table_replace (
folder_info_ht,
folder_info->full_name,
folder_info_ref (folder_info));