aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 80e9638ce1..0014d48553 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -284,10 +284,10 @@ mail_tool_move_folder_contents (CamelFolder *source, CamelFolder *dest, gboolean
/* Copy the messages */
for (i = 0; i < uids->len; i++) {
CamelMimeMessage *msg;
- const CamelMessageInfo *info = NULL;
+ CamelMessageInfo *info = NULL;
const gboolean last_message = (i+1 == uids->len);
time_t now;
-
+
/* Info */
/*
@@ -317,6 +317,9 @@ mail_tool_move_folder_contents (CamelFolder *source, CamelFolder *dest, gboolean
if (summary_capability)
info = camel_folder_get_message_info (source, uids->pdata[i]);
camel_folder_append_message (dest, msg, info, ex);
+ if (summary_capability)
+ camel_folder_free_message_info(source, info);
+
if (camel_exception_is_set (ex)) {
camel_object_unref (CAMEL_OBJECT (msg));
goto cleanup;