aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-format.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f492ba39a8..9ffe778c10 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,7 @@
+2001-04-12 Dan Winship <danw@ximian.com>
+
+ * mail-format.c (mail_part_is_inline): Don't leak memory.
+
2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
* mail-accounts.c (pgp_path_changed): Updated for changes to PGP
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 63b90b913e..05144611bc 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -471,6 +471,8 @@ mail_part_is_inline (CamelMimePart *part)
{
const char *disposition;
CamelContentType *content_type;
+ char *type;
+ gboolean anon;
/* If it has an explicit disposition, return that. */
disposition = camel_mime_part_get_disposition (part);
@@ -487,7 +489,10 @@ mail_part_is_inline (CamelMimePart *part)
/* Otherwise, display it inline if it's "anonymous", and
* as an attachment otherwise.
*/
- return is_anonymous (part, header_content_type_simple (content_type));
+ type = header_content_type_simple (content_type);
+ anon = is_anonymous (part, type);
+ g_free (type);
+ return anon;
}
static void