aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/mail-send-recv.c15
-rw-r--r--mail/message-list.c4
2 files changed, 17 insertions, 2 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index a8bade95a1..0d2cc10d00 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -881,10 +881,21 @@ receive_done (gint still_more,
/* remove/free this active download */
d(printf("%s: freeing info %p\n", G_STRFUNC, info));
- if (info->type == SEND_SEND)
+ if (info->type == SEND_SEND) {
+ gpointer key = NULL, value = NULL;
+ if (!g_hash_table_lookup_extended (info->data->active, SEND_URI_KEY, &key, &value))
+ key = NULL;
+
g_hash_table_steal (info->data->active, SEND_URI_KEY);
- else
+ g_free (key);
+ } else {
+ gpointer key = NULL, value = NULL;
+ if (!g_hash_table_lookup_extended (info->data->active, uid, &key, &value))
+ key = NULL;
+
g_hash_table_steal (info->data->active, uid);
+ g_free (key);
+ }
info->data->infos = g_list_remove (info->data->infos, info);
if (g_hash_table_size (info->data->active) == 0) {
diff --git a/mail/message-list.c b/mail/message-list.c
index 997e38d12a..7cce5f9899 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3908,6 +3908,10 @@ message_list_set_folder (MessageList *message_list,
if (message_list->folder) {
g_signal_handlers_disconnect_by_func (
message_list->folder, folder_changed, message_list);
+
+ if (message_list->uid_nodemap)
+ g_hash_table_foreach (message_list->uid_nodemap, (GHFunc) clear_info, message_list);
+
g_object_unref (message_list->folder);
message_list->folder = NULL;
}