aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
author1 <notzed@helixcode.com>2000-05-12 01:05:04 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-12 01:05:04 +0800
commitd91a0645f9f595cbfa953187c366dc569f5e8e41 (patch)
tree44eb3a4d5fd44f5cff9b0b7e06117ae5db216bc0 /camel
parentcb0faab99bd4f590409a3b2c2ceb87f8d04cb700 (diff)
downloadgsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.tar
gsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.tar.gz
gsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.tar.bz2
gsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.tar.lz
gsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.tar.xz
gsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.tar.zst
gsoc2013-evolution-d91a0645f9f595cbfa953187c366dc569f5e8e41.zip
Free summary items and charset filters.
2000-05-11 <notzed@helixcode.com> * camel-folder-summary.c (camel_folder_summary_finalise): Free summary items and charset filters. 2000-05-10 <notzed@helixcode.com> * camel-folder-summary.c (camel_folder_summary_finalise): Don't free stuff in p, after we've free'd p. * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref the stream we created for appending. svn path=/trunk/; revision=2986
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog13
-rw-r--r--camel/camel-folder-summary.c14
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c11
3 files changed, 30 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 8249df97f2..e615c3917f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,16 @@
+2000-05-11 <notzed@helixcode.com>
+
+ * camel-folder-summary.c (camel_folder_summary_finalise): Free
+ summary items and charset filters.
+
+2000-05-10 <notzed@helixcode.com>
+
+ * camel-folder-summary.c (camel_folder_summary_finalise): Don't
+ free stuff in p, after we've free'd p.
+
+ * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
+ the stream we created for appending.
+
2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index bdca6e677c..516f9335bd 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -167,6 +167,12 @@ camel_folder_summary_init (CamelFolderSummary *s)
s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal);
}
+static void free_o_name(void *key, void *value, void *data)
+{
+ gtk_object_unref((GtkObject *)value);
+ g_free(key);
+}
+
static void
camel_folder_summary_finalise (GtkObject *obj)
{
@@ -175,14 +181,12 @@ camel_folder_summary_finalise (GtkObject *obj)
p = _PRIVATE(obj);
- /* FIXME: free contents */
+ camel_folder_summary_clear(s);
g_ptr_array_free(s->messages, TRUE);
-
g_hash_table_destroy(s->messages_uid);
- /* FIXME: free contents */
+ g_hash_table_foreach(p->filter_charset, free_o_name, 0);
g_hash_table_destroy(p->filter_charset);
- g_free(p);
if (p->filter_index)
gtk_object_unref ((GtkObject *)p->filter_index);
@@ -193,6 +197,8 @@ camel_folder_summary_finalise (GtkObject *obj)
if (p->filter_save)
gtk_object_unref ((GtkObject *)p->filter_save);
+ g_free(p);
+
((GtkObjectClass *)(camel_folder_summary_parent))->finalize((GtkObject *)obj);
}
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index c38951a74d..05d00c608e 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -1,4 +1,4 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
/* camel-mbox-folder.c : Abstract class for an email folder */
/*
@@ -744,15 +744,17 @@ mbox_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
filter_stream = (CamelStream *)camel_stream_filter_new_with_stream(output_stream);
filter_from = (CamelMimeFilter *)camel_mime_filter_from_new();
camel_stream_filter_add((CamelStreamFilter *)filter_stream, filter_from);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message),
- filter_stream, ex);
+ camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), filter_stream, ex);
if (!camel_exception_is_set (ex))
camel_stream_flush (filter_stream, ex);
if (camel_exception_is_set (ex))
goto fail;
+ /* filter stream ref's the output stream itself, so we need to unref it too */
+ gtk_object_unref (GTK_OBJECT (filter_from));
gtk_object_unref (GTK_OBJECT (filter_stream));
+ gtk_object_unref (GTK_OBJECT (output_stream));
/* force a summary update - will only update from the new position, if it can */
camel_mbox_summary_update(mbox_folder->summary, seek);
@@ -771,7 +773,8 @@ fail:
if (filter_stream) {
/*camel_stream_close (filter_stream);*/
gtk_object_unref ((GtkObject *)filter_stream);
- } else if (output_stream)
+ }
+ if (output_stream)
gtk_object_unref ((GtkObject *)output_stream);
/* make sure the file isn't munged by us */