diff options
author | Milan Crha <mcrha@redhat.com> | 2010-06-25 02:43:16 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-06-25 02:43:16 +0800 |
commit | 179db75ce041706a590e90a6ac7b801b36091ed6 (patch) | |
tree | 1aad2005c928c833690303d749e477e872009aa2 /mail | |
parent | 9d538474a855d64e338bf7a94925cbde31a81bd5 (diff) | |
download | gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.tar gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.tar.gz gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.tar.bz2 gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.tar.lz gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.tar.xz gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.tar.zst gsoc2013-evolution-179db75ce041706a590e90a6ac7b801b36091ed6.zip |
Bug #620815 - Memory leaks with Evolution
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-reader-utils.c | 1 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 2 | ||||
-rw-r--r-- | mail/mail-config.c | 49 |
3 files changed, 24 insertions, 28 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 539f9274b1..a1e0ebbc52 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -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); diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 514885c28b..4a41217f3d 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -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 */ diff --git a/mail/mail-config.c b/mail/mail-config.c index ab58ce8673..c7adc4ccc0 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -147,41 +147,17 @@ 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) { 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 |