From: Arne Zellentin Date: Fri, 9 Jun 2006 10:37:42 +0000 (+0000) Subject: * fixed 2 memleaks X-Git-Tag: git_migration_finished~4645 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=ed224243f52810115235e97f97969c12774cf21f * fixed 2 memleaks pmo-trunk-r209 --- diff --git a/src/modest-tny-msg-view.c b/src/modest-tny-msg-view.c index af06c1a..f97283f 100644 --- a/src/modest-tny-msg-view.c +++ b/src/modest-tny-msg-view.c @@ -247,10 +247,13 @@ find_attachment_by_filename (TnyMsgIface *msg, const gchar *fn) part = g_list_nth_data(parts, pos); dummy = construct_virtual_filename_from_mime_part(part, pos); - if (strcmp(dummy, fn) == 0) + if (strcmp(dummy, fn) == 0) { + g_free(dummy); return part; - else + } else { + g_free(dummy); return NULL; + } } @@ -438,6 +441,7 @@ attachments_as_html(ModestTnyMsgView *self, TnyMsgIface *msg) } else { g_string_append_printf(appendix, "%s: %s
\n", filename, filename, content_type); } + g_free(virtual_filename); } attachment = attachment->next; }