aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
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')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-utils.c8
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))