diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/component-factory.c | 7 | ||||
-rw-r--r-- | mail/folder-browser.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 4681d93365..b1bdc09d18 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -270,11 +270,15 @@ create_imap_storage (EvolutionShellComponent *shell_component) corba_shell = evolution_shell_component_get_owner (shell_component); if (corba_shell == CORBA_OBJECT_NIL) { g_warning ("We have no shell!?"); + g_free (source); return; } - if (!(server = strchr (source, '@'))) + if (!(server = strchr (source, '@'))) { + g_free (source); return; + } + server++; for (p = server; *p && *p != '/'; p++); @@ -285,6 +289,7 @@ create_imap_storage (EvolutionShellComponent *shell_component) if (evolution_storage_register_on_shell (storage, corba_shell) != EVOLUTION_STORAGE_OK) { g_warning ("Cannot register storage"); + g_free (source); return; } diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 613a3b00fa..b8b9287d08 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -105,8 +105,9 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name) char *service, *ptr; fprintf (stderr, "\n****** name = %s ******\n\n", name); - service = g_strdup (name); + service = g_strdup_printf ("%s/", name); for (ptr = service + 7; *ptr && *ptr != '/'; ptr++); + ptr++; *ptr = '\0'; fprintf (stderr, "\n****** service = %s ******\n\n", service); store = camel_session_get_store (session, service, ex); |