aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-11-28 20:20:23 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-11-28 20:20:23 +0800
commitc3bf6cb846d9fbc5751639ef698c29adaea32165 (patch)
treef6da1206bf36bebcc7a787a7addc1508475d574e /plugins
parentd1d61c75f975a151dc131ef3b094a9821c7bb1c5 (diff)
downloadgsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar
gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar.gz
gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar.bz2
gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar.lz
gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar.xz
gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar.zst
gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.zip
** Part of fix for bug #503662
2008-11-28 Milan Crha <mcrha@redhat.com> ** Part of fix for bug #503662 * caldav-source.c: (user_changed): Set NULL properly to protect against using already freed memory. svn path=/trunk/; revision=36821
Diffstat (limited to 'plugins')
-rw-r--r--plugins/caldav/ChangeLog7
-rw-r--r--plugins/caldav/caldav-source.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/caldav/ChangeLog b/plugins/caldav/ChangeLog
index 777826ec40..ca3d819ecf 100644
--- a/plugins/caldav/ChangeLog
+++ b/plugins/caldav/ChangeLog
@@ -1,5 +1,12 @@
2008-11-28 Milan Crha <mcrha@redhat.com>
+ ** Part of fix for bug #503662
+
+ * caldav-source.c: (user_changed):
+ Set NULL properly to protect against using already freed memory.
+
+2008-11-28 Milan Crha <mcrha@redhat.com>
+
** Part of fix for bug #359745
* caldav-source.c: (ensure_caldav_source_group),
diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c
index cd758f54bb..81e5b0fdd9 100644
--- a/plugins/caldav/caldav-source.c
+++ b/plugins/caldav/caldav-source.c
@@ -191,11 +191,12 @@ user_changed (GtkEntry *editable, ESource *source)
euri = e_uri_new (uri);
g_free (euri->user);
- if (user != NULL) {
+ if (user != NULL && *user) {
euri->user = g_strdup (user);
e_source_set_property (source, "auth", "1");
} else {
e_source_set_property (source, "auth", NULL);
+ euri->user = NULL;
}
e_source_set_property (source, "username", euri->user);