diff options
author | bertrand <bertrand@helixcode.com> | 2000-03-09 03:53:31 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-03-09 03:53:31 +0800 |
commit | 207a1395e10cbce4f9ec3baa33a649fb9a151a27 (patch) | |
tree | 385a02f3528a4b582c38af77c9c98f44032514a5 /camel/camel-formatter.c | |
parent | 13edeabcd2978c1e7febe005cd3fb2f19c55edc1 (diff) | |
download | gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.gz gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.bz2 gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.lz gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.xz gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.zst gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.zip |
plug mem leaks due to bad documentation of
2000-03-07 bertrand <bertrand@helixcode.com>
* camel-formatter.c (handle_mime_part):
plug mem leaks due to bad documentation
of camel_content_field_get_mime_type
(print_camel_body_part): idem
(handle_multipart_alternative): idem
* gmime-content-field.c (gmime_content_field_get_mime_type):
documentation fix.
* camel-mime-part.c (my_finalize): unref the
content_input_stream if any.
* shell/e-shell-shortcut.c (shortcut_bar_item_selected):
removed a test that prevented the standard menu
to be shown.
svn path=/trunk/; revision=2089
Diffstat (limited to 'camel/camel-formatter.c')
-rw-r--r-- | camel/camel-formatter.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/camel/camel-formatter.c b/camel/camel-formatter.c index 3ab86b7435..b1caf9f6fc 100644 --- a/camel/camel-formatter.c +++ b/camel/camel-formatter.c @@ -778,11 +778,13 @@ handle_mime_part (CamelFormatter *formatter, { CamelMimePart* mime_part; CamelDataWrapper* message_contents; + gchar *whole_mime_type; g_assert (formatter); g_assert (wrapper); g_assert (CAMEL_IS_MIME_PART (wrapper)); + mime_part = CAMEL_MIME_PART (wrapper); message_contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); @@ -797,10 +799,12 @@ handle_mime_part (CamelFormatter *formatter, // "<table width=95% border=1><tr><td>\n\n"); /* dispatch the correct handler function for the mime type */ + whole_mime_type = MIME_TYPE_WHOLE (mime_part); call_handler_function (formatter, message_contents, - MIME_TYPE_WHOLE (mime_part), + whole_mime_type, MIME_TYPE_MAIN (mime_part)); - + g_free (whole_mime_type); + /* close up the table we opened */ // camel_stream_write_string (formatter->priv->stream, // "\n\n</td></tr></table>\n\n"); @@ -855,6 +859,8 @@ print_camel_body_part (CamelMimeBodyPart* body_part, CamelFormatter* formatter, gboolean* text_printed_yet) { + gchar *whole_mime_type; + CamelDataWrapper* contents = camel_medium_get_content_object (CAMEL_MEDIUM (body_part)); gboolean is_text = @@ -862,9 +868,11 @@ print_camel_body_part (CamelMimeBodyPart* body_part, if (is_text && *text_printed_yet) return; - - call_handler_function (formatter, contents, MIME_TYPE_WHOLE (body_part), + whole_mime_type = MIME_TYPE_WHOLE (body_part); + call_handler_function (formatter, contents, whole_mime_type, MIME_TYPE_MAIN (body_part)); + g_free (whole_mime_type); + camel_stream_write_string (formatter->priv->stream, "\n\n"); /* use this when gtktmhl is fixed */ /* camel_stream_write_string (formatter->priv->stream, "\n<hr>\n"); */ @@ -940,7 +948,8 @@ handle_multipart_alternative (CamelFormatter *formatter, { CamelMultipart* multipart = CAMEL_MULTIPART (wrapper); CamelMimePart* mime_part; - + gchar *whole_mime_type; + debug ("handle_multipart_alternative: entered\n"); mime_part = @@ -952,9 +961,11 @@ handle_multipart_alternative (CamelFormatter *formatter, camel_medium_get_content_object ( CAMEL_MEDIUM (mime_part)); + whole_mime_type = MIME_TYPE_WHOLE (mime_part); call_handler_function (formatter, contents, - MIME_TYPE_WHOLE (mime_part), + whole_mime_type, MIME_TYPE_MAIN (mime_part)); + g_free (whole_mime_type); } debug ("handle_multipart_alternative: exiting\n"); |