aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2004-07-14 23:20:19 +0800
committerDan Winship <danw@src.gnome.org>2004-07-14 23:20:19 +0800
commit5b61aaf875ab040a1f0074b3a30bf484826b4476 (patch)
treec25e959ad2326f012c5c23a678b9c634b03f143b
parent109c235bb23836ebe9a95bd5862a0e7ead568236 (diff)
downloadgsoc2013-evolution-5b61aaf875ab040a1f0074b3a30bf484826b4476.tar.gz
gsoc2013-evolution-5b61aaf875ab040a1f0074b3a30bf484826b4476.tar.zst
gsoc2013-evolution-5b61aaf875ab040a1f0074b3a30bf484826b4476.zip
free return value from e_mkdtemp
* em-utils.c (em_utils_selection_set_urilist, em_utils_temp_save_part): free return value from e_mkdtemp svn path=/trunk/; revision=26648
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-utils.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index fd86443c71..5ece10af5f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-13 Dan Winship <danw@novell.com>
+
+ * em-utils.c (em_utils_selection_set_urilist,
+ em_utils_temp_save_part): free return value from e_mkdtemp
+
2004-07-09 Not Zed <NotZed@Ximian.com>
* em-folder-browser.c (emfb_folder_expunge): only call expunge if
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 11e4f642c2..1c9bcbdce6 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -994,7 +994,7 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
void
em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtrArray *uids)
{
- const char *tmpdir;
+ char *tmpdir;
CamelStream *fstream;
char *uri, *p, *file = NULL;
int fd;
@@ -1023,6 +1023,7 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
p = uri = g_alloca (strlen (tmpdir) + strlen(file) + 16);
p += sprintf (uri, "file:///%s/%s", tmpdir, file);
+ g_free(tmpdir);
g_free(file);
fd = open(uri + 7, O_WRONLY | O_CREAT | O_EXCL, 0666);
@@ -1104,8 +1105,8 @@ emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
char *
em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part)
{
- const char *tmpdir, *filename;
- char *path, *mfilename = NULL;
+ const char *filename;
+ char *tmpdir, *path, *mfilename = NULL;
int done;
tmpdir = e_mkdtemp("evolution-tmp-XXXXXX");
@@ -1125,6 +1126,7 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part)
}
path = g_build_filename(tmpdir, filename, NULL);
+ g_free(tmpdir);
g_free(mfilename);
/* FIXME: This doesn't handle default charsets */