aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-10-05 05:55:53 +0800
committerDan Winship <danw@src.gnome.org>2000-10-05 05:55:53 +0800
commit67360d96cd326bff74a8ff55eee38a60db49fb91 (patch)
tree41cd9c3deb6ece9b3e59d6ee36d07892744dda14
parentee09fc6d052a92c0d62a6f42b5a639f2a3af590c (diff)
downloadgsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.tar
gsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.tar.gz
gsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.tar.bz2
gsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.tar.lz
gsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.tar.xz
gsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.tar.zst
gsoc2013-evolution-67360d96cd326bff74a8ff55eee38a60db49fb91.zip
Fix a case where a variable was free'd and then possibly used in an error
* providers/mbox/camel-mbox-store.c (get_folder): Fix a case where a variable was free'd and then possibly used in an error message. svn path=/trunk/; revision=5722
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/mbox/camel-mbox-store.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 294fd8ebb0..b593806e9b 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-04 Dan Winship <danw@helixcode.com>
+
+ * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
+ a variable was free'd and then possibly used in an error message.
+
2000-10-04 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-provider.c
@@ -188,7 +193,6 @@
* providers/imap/camel-imap-stream.c (stream_read): Same.
->>>>>>> 1.503
2000-09-28 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_fold): New function to fold headers.
diff --git a/camel/providers/mbox/camel-mbox-store.c b/camel/providers/mbox/camel-mbox-store.c
index 8bf77c9774..7ad9333b91 100644
--- a/camel/providers/mbox/camel-mbox-store.c
+++ b/camel/providers/mbox/camel-mbox-store.c
@@ -137,14 +137,15 @@ get_folder (CamelStore *store, const char *folder_name, gboolean create,
}
fd = open (name, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
- g_free (name);
if (fd == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Could not create file `%s':"
"\n%s", name,
g_strerror (errno));
+ g_free (name);
return NULL;
}
+ g_free (name);
close (fd);
} else if (!S_ISREG (st.st_mode)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,