diff options
author | Milan Crha <mcrha@redhat.com> | 2008-11-28 20:20:23 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-11-28 20:20:23 +0800 |
commit | c3bf6cb846d9fbc5751639ef698c29adaea32165 (patch) | |
tree | f6da1206bf36bebcc7a787a7addc1508475d574e /plugins/caldav | |
parent | d1d61c75f975a151dc131ef3b094a9821c7bb1c5 (diff) | |
download | gsoc2013-evolution-c3bf6cb846d9fbc5751639ef698c29adaea32165.tar.gz 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/caldav')
-rw-r--r-- | plugins/caldav/ChangeLog | 7 | ||||
-rw-r--r-- | plugins/caldav/caldav-source.c | 3 |
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); |