aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c7
1 files changed, 6 insertions, 1 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;
}