diff options
-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); |