aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-utils.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index b68d4e74ff..22d3f92355 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-22 Patrick Ohly <patrick.ohly@intel.com>
+
+ * em-utils.c (em_utils_selection_set_urilist):
+ Fixed premature memory free. Fixes bug #335203.
+
2006-03-21 Simon Zheng <simon.zheng@sun.com>
Fixed bug #326571
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 458fd2c02c..76c817aa17 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1208,12 +1208,13 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
g_free(file);
fd = g_open(tmpfile, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
- g_free(tmpfile);
if (fd == -1) {
+ g_free(tmpfile);
return;
}
uri = g_filename_to_uri(tmpfile, NULL, NULL);
+ g_free(tmpfile);
fstream = camel_stream_fs_new_with_fd(fd);
if (fstream) {
if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) {