aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorHiroyuki Ikezoe <poincare@ikezoe.net>2007-07-27 13:56:56 +0800
committerHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-27 13:56:56 +0800
commit2821b99a0b44a1ebf39da6b826950a5ab1b395ae (patch)
tree9cfd82f939ad04db6c2ffd538bc6c975a7f413e0 /mail/em-utils.c
parent0a1f5ca4b37c702a184bb8223fb4206f62b9f605 (diff)
downloadgsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.tar
gsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.tar.gz
gsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.tar.bz2
gsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.tar.lz
gsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.tar.xz
gsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.tar.zst
gsoc2013-evolution-2821b99a0b44a1ebf39da6b826950a5ab1b395ae.zip
Do not free const pointer. Plugged memory leak.
2007-07-27 Hiroyuki Ikezoe <poincare@ikezoe.net> * em-utils.c: (em_utils_save_parts): Do not free const pointer. Plugged memory leak. svn path=/trunk/; revision=33856
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c8
1 files changed, 4 insertions, 4 deletions
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))