From d5e79599437b6e1c47ef1ba5f5ae58c2410bfa2a Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 22 Mar 2006 12:00:05 +0000 Subject: Fixed premature memory free. Fixes bug #335203. 2006-03-22 Patrick Ohly * em-utils.c (em_utils_selection_set_urilist): Fixed premature memory free. Fixes bug #335203. svn path=/trunk/; revision=31740 --- mail/ChangeLog | 5 +++++ mail/em-utils.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 + + * em-utils.c (em_utils_selection_set_urilist): + Fixed premature memory free. Fixes bug #335203. + 2006-03-21 Simon Zheng 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) { -- cgit v1.2.3