Bug #620815 - Memory leaks with Evolution
This commit is contained in:
@ -471,6 +471,7 @@ composer_header_table_from_changed_cb (EComposerHeaderTable *table)
|
||||
composer_header_table_update_destinations (
|
||||
old_destinations, always_cc ? account->cc_addrs : NULL);
|
||||
e_composer_header_table_set_destinations_cc (table, new_destinations);
|
||||
e_destination_freev (old_destinations);
|
||||
e_destination_freev (new_destinations);
|
||||
|
||||
/* Update automatic BCC destinations. */
|
||||
@ -480,6 +481,7 @@ composer_header_table_from_changed_cb (EComposerHeaderTable *table)
|
||||
composer_header_table_update_destinations (
|
||||
old_destinations, always_bcc ? account->bcc_addrs : NULL);
|
||||
e_composer_header_table_set_destinations_bcc (table, new_destinations);
|
||||
e_destination_freev (old_destinations);
|
||||
e_destination_freev (new_destinations);
|
||||
|
||||
/* XXX We should NOT be checking specific account types here.
|
||||
|
@ -154,6 +154,8 @@ composer_name_header_constructor (GType type,
|
||||
NULL);
|
||||
E_COMPOSER_HEADER (object)->input_widget = g_object_ref_sink (entry);
|
||||
|
||||
g_free (label);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
@ -270,6 +270,7 @@ e_mail_reader_open_selected (EMailReader *reader)
|
||||
gtk_widget_show (browser);
|
||||
}
|
||||
|
||||
g_ptr_array_foreach (views, (GFunc) g_free, NULL);
|
||||
g_ptr_array_free (views, TRUE);
|
||||
|
||||
em_utils_uids_free (uids);
|
||||
|
@ -1690,6 +1690,8 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
|
||||
* automatic CC addresses that have already been added. */
|
||||
e_composer_header_table_add_destinations_cc (table, ccv);
|
||||
|
||||
e_destination_freev (tov);
|
||||
e_destination_freev (ccv);
|
||||
g_free (subject);
|
||||
|
||||
/* add post-to, if nessecary */
|
||||
|
@ -146,34 +146,6 @@ gconf_outlook_filenames_changed (GConfClient *client, guint cnxn_id,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gconf_jh_check_changed (GConfClient *client, guint cnxn_id,
|
||||
GConfEntry *entry, gpointer user_data)
|
||||
{
|
||||
config->jh_check = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/junk/check_custom_header", NULL);
|
||||
if (!config->jh_check) {
|
||||
mail_session_set_junk_headers (NULL, NULL, 0);
|
||||
} else {
|
||||
GSList *node;
|
||||
GPtrArray *name, *value;
|
||||
|
||||
config->jh_header = gconf_client_get_list (config->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
|
||||
node = config->jh_header;
|
||||
name = g_ptr_array_new ();
|
||||
value = g_ptr_array_new ();
|
||||
while (node && node->data) {
|
||||
gchar **tok = g_strsplit (node->data, "=", 2);
|
||||
g_ptr_array_add (name, g_strdup(tok[0]));
|
||||
g_ptr_array_add (value, g_strdup(tok[1]));
|
||||
node = node->next;
|
||||
g_strfreev (tok);
|
||||
}
|
||||
mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len);
|
||||
g_ptr_array_free (name, TRUE);
|
||||
g_ptr_array_free (value, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gconf_jh_headers_changed (GConfClient *client, guint cnxn_id,
|
||||
GConfEntry *entry, gpointer user_data)
|
||||
@ -181,7 +153,11 @@ gconf_jh_headers_changed (GConfClient *client, guint cnxn_id,
|
||||
GSList *node;
|
||||
GPtrArray *name, *value;
|
||||
|
||||
g_slist_foreach (config->jh_header, (GFunc) g_free, NULL);
|
||||
g_slist_free (config->jh_header);
|
||||
|
||||
config->jh_header = gconf_client_get_list (config->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, NULL);
|
||||
|
||||
node = config->jh_header;
|
||||
name = g_ptr_array_new ();
|
||||
value = g_ptr_array_new ();
|
||||
@ -193,6 +169,23 @@ gconf_jh_headers_changed (GConfClient *client, guint cnxn_id,
|
||||
g_strfreev (tok);
|
||||
}
|
||||
mail_session_set_junk_headers ((const gchar **)name->pdata, (const gchar **)value->pdata, name->len);
|
||||
|
||||
g_ptr_array_foreach (name, (GFunc) g_free, NULL);
|
||||
g_ptr_array_foreach (value, (GFunc) g_free, NULL);
|
||||
g_ptr_array_free (name, TRUE);
|
||||
g_ptr_array_free (value, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
gconf_jh_check_changed (GConfClient *client, guint cnxn_id,
|
||||
GConfEntry *entry, gpointer user_data)
|
||||
{
|
||||
config->jh_check = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/junk/check_custom_header", NULL);
|
||||
if (!config->jh_check) {
|
||||
mail_session_set_junk_headers (NULL, NULL, 0);
|
||||
} else {
|
||||
gconf_jh_headers_changed (NULL, 0, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1385,6 +1385,7 @@ e_shell_searchbar_load_state (EShellSearchbar *searchbar)
|
||||
else if (searchbar->priv->search_option != NULL)
|
||||
gtk_radio_action_set_current_value (
|
||||
searchbar->priv->search_option, 0);
|
||||
g_free (string);
|
||||
|
||||
key = STATE_KEY_SEARCH_TEXT;
|
||||
string = g_key_file_get_string (key_file, state_group, key, NULL);
|
||||
|
@ -97,6 +97,8 @@ shell_window_init_switcher_style (EShellWindow *shell_window)
|
||||
|
||||
gtk_radio_action_set_current_value (
|
||||
GTK_RADIO_ACTION (action), style);
|
||||
|
||||
g_free (string);
|
||||
}
|
||||
|
||||
g_signal_connect (
|
||||
|
@ -2004,6 +2004,7 @@ e_date_edit_update_time_entry (EDateEdit *dedit)
|
||||
|
||||
if (strcmp (b, t) == 0) {
|
||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->time_combo), &iter);
|
||||
g_free (text);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user