aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-06-01 06:10:13 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-06-01 06:10:13 +0800
commit5a35647b7d94b54baec0b2e21b401a056bd2b06d (patch)
treea96a4621ccb4b0a60e9ef25b852a8db3f9795a47 /camel
parent8c4223b4c440d5b94eddaf0fe7bd8f1489186c2c (diff)
downloadgsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.tar
gsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.tar.gz
gsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.tar.bz2
gsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.tar.lz
gsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.tar.xz
gsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.tar.zst
gsoc2013-evolution-5a35647b7d94b54baec0b2e21b401a056bd2b06d.zip
When the part is a multipart/signed, make sure to free the part_spec
2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): When the part is a multipart/signed, make sure to free the part_spec before returning (the other types already did this properly). svn path=/trunk/; revision=17066
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/providers/imap/camel-imap-folder.c27
2 files changed, 18 insertions, 13 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 2dc1ccb816..dd1f8cd40c 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,9 @@
2002-05-31 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/imap/camel-imap-folder.c (get_content): When the part
+ is a multipart/signed, make sure to free the part_spec before
+ returning (the other types already did this properly).
+
* providers/imap/camel-imap-message-cache.c
(camel_imap_message_cache_get): Free the path buffer when we're
done with it.
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 76ceb5a796..076066782f 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1577,32 +1577,33 @@ get_content (CamelImapFolder *imap_folder, const char *uid,
part_spec = content_info_get_part_spec (ci);
/* There are three cases: multipart/signed, multipart, message/rfc822, and "other" */
- if (header_content_type_is(ci->type, "multipart", "signed")) {
+ if (header_content_type_is (ci->type, "multipart", "signed")) {
CamelMultipartSigned *body_mp;
char *spec;
int ret;
-
+
/* Note: because we get the content parts uninterpreted anyway, we could potentially
just use the normalmultipart code, except that multipart/signed wont let you yet! */
-
- body_mp = camel_multipart_signed_new();
+
+ body_mp = camel_multipart_signed_new ();
/* need to set this so it grabs the boundary and other info about the signed type */
/* we assume that part->content_type is more accurate/full than ci->type */
- camel_data_wrapper_set_mime_type_field(CAMEL_DATA_WRAPPER(body_mp), part->content_type);
-
- spec = alloca(strlen(part_spec) + 6);
- sprintf(spec, part_spec[0]?"%s.TEXT":"TEXT", part_spec);
-
+ camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (body_mp), part->content_type);
+
+ spec = alloca (strlen (part_spec) + 6);
+ sprintf (spec, part_spec[0] ? "%s.TEXT" : "TEXT", part_spec);
+ g_free (part_spec);
+
stream = camel_imap_folder_fetch_data (imap_folder, uid, spec, FALSE, ex);
if (stream) {
- ret = camel_data_wrapper_construct_from_stream(CAMEL_DATA_WRAPPER(body_mp), stream);
- camel_object_unref(CAMEL_OBJECT(stream));
+ ret = camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (body_mp), stream);
+ camel_object_unref (CAMEL_OBJECT (stream));
if (ret == -1) {
- camel_object_unref((CamelObject *)body_mp);
+ camel_object_unref ((CamelObject *) body_mp);
return NULL;
}
}
-
+
return (CamelDataWrapper *)body_mp;
} else if (header_content_type_is (ci->type, "multipart", "*")) {
CamelMultipart *body_mp;