diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/em-utils.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 59dd5c4cf8..b57857f38c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2007-07-27 Hiroyuki Ikezoe <poincare@ikezoe.net> + + * em-utils.c: (em_utils_save_parts): Do not free const pointer. + Plugged memory leak. + 2007-07-26 Milan Crha <mcrha@redhat.com> ** Fix for bug #273386 diff --git a/mail/em-utils.c b/mail/em-utils.c index 78e5cbca06..adf0f839ce 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -434,14 +434,14 @@ em_utils_save_parts (GtkWidget *parent, const gchar *prompt, GSList *parts) for (iter = parts; iter != NULL; iter = iter->next) { CamelMimePart *part = iter->data; - const gchar *filename, *utf8_filename; - gchar *uri; + const gchar *utf8_filename; + gchar *uri, *filename; utf8_filename = emu_save_get_filename_for_part (part); - filename = g_filename_from_utf8 ((const char *) utf8_filename, -1, NULL, NULL, NULL); - g_free (utf8_filename); + filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL); uri = g_build_path ("/", path_uri, filename, NULL); + g_free (filename); /* XXX Would be nice to mention _why_ we can't save. */ if (e_file_can_save (GTK_WINDOW (file_chooser), uri)) |