* Fixes several memory leaks
[modest] / src / maemo / easysetup / modest-easysetup-wizard-dialog.c
index 17b98f8..90c1f96 100644 (file)
@@ -1689,6 +1689,7 @@ on_before_next (ModestWizardDialog *dialog, GtkWidget *current_page, GtkWidget *
                /* Aavoid a clash with an existing display name: */
                const gboolean name_in_use = modest_account_mgr_account_with_display_name_exists (
                        priv->account_manager, account_title);
+               g_free (account_title);
 
                if (name_in_use) {
                        /* Warn the user via a dialog: */
@@ -1874,7 +1875,7 @@ save_to_settings (ModestEasysetupWizardDialog *self)
 {
        ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self);
        guint special_port;
-       gchar *provider_id;
+       gchar *provider_id = NULL;
        gchar* display_name;
        const gchar *username, *password;
        gchar *store_hostname, *transport_hostname;
@@ -1927,6 +1928,7 @@ save_to_settings (ModestEasysetupWizardDialog *self)
                                   "but it's not a ModestAccountProtocol");
                }
 
+               g_free (provider_id);
                return;
        }
 
@@ -2099,5 +2101,6 @@ save_to_settings (ModestEasysetupWizardDialog *self)
        display_name = get_entered_account_title (self);
        modest_account_settings_set_display_name (priv->settings, display_name);
        g_free (display_name);
+       g_free (provider_id);
 }