fix bug 2957, 'Double-free in account preferences'
[claws.git] / src / prefs_account.c
index 32eeeed9f32bdf127af776213020778081f478bf..7990a31879e81bbd16d96a91a9b7c4bdc3020247 100644 (file)
@@ -3700,10 +3700,9 @@ PrefsAccount *prefs_account_open(PrefsAccount *ac_prefs, gboolean *dirty)
 
        if (!cancelled && dirty != NULL)
                *dirty = TRUE;
-       if (cancelled && new_account) {
-               prefs_account_free(ac_prefs);
+       if (cancelled && new_account)
                return NULL;
-       else {
+       else {
                if (ac_prefs->recv_server)
                        g_strstrip(ac_prefs->recv_server);
                if (ac_prefs->smtp_server)