aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 489dda4402..41fe74df55 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -43,13 +43,14 @@
#include "mail-vfolder.h"
#include "mail-session.h"
#include "composer/e-msg-composer.h"
-#include "folder-browser.h"
#include "filter/filter-filter.h"
#include "mail-mt.h"
#include "mail-folder-cache.h"
+#include "em-utils.h"
+
#define w(x)
#define d(x)
@@ -150,17 +151,12 @@ static void
filter_folder_free (struct _mail_msg *mm)
{
struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
- int i;
if (m->source_folder)
camel_object_unref (m->source_folder);
- if (m->source_uids) {
- for (i = 0; i < m->source_uids->len; i++)
- g_free (m->source_uids->pdata[i]);
-
- g_ptr_array_free (m->source_uids, TRUE);
- }
+ if (m->source_uids)
+ em_utils_uids_free (m->source_uids);
if (m->cancel)
camel_operation_unref (m->cancel);
@@ -1001,14 +997,10 @@ static void
transfer_messages_free (struct _mail_msg *mm)
{
struct _transfer_msg *m = (struct _transfer_msg *)mm;
- int i;
-
+
camel_object_unref (m->source);
g_free (m->dest_uri);
- for (i = 0; i < m->uids->len; i++)
- g_free (m->uids->pdata[i]);
- g_ptr_array_free (m->uids, TRUE);
-
+ em_utils_uids_free (m->uids);
}
static struct _mail_msg_op transfer_messages_op = {
@@ -1854,10 +1846,8 @@ static void get_messages_free(struct _mail_msg *mm)
{
struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
int i;
-
- for (i=0;i<m->uids->len;i++)
- g_free(m->uids->pdata[i]);
- g_ptr_array_free(m->uids, TRUE);
+
+ em_utils_uids_free (m->uids);
for (i=0;i<m->messages->len;i++) {
if (m->messages->pdata[i])
camel_object_unref(m->messages->pdata[i]);
@@ -2007,11 +1997,8 @@ static void save_messages_saved(struct _mail_msg *mm)
static void save_messages_free(struct _mail_msg *mm)
{
struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
- int i;
-
- for (i=0;i<m->uids->len;i++)
- g_free(m->uids->pdata[i]);
- g_ptr_array_free(m->uids, TRUE);
+
+ em_utils_uids_free (m->uids);
camel_object_unref(m->folder);
g_free(m->path);
}