diff options
author | Milan Crha <mcrha@redhat.com> | 2012-09-13 18:01:38 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-09-13 18:01:38 +0800 |
commit | 309254e2ce5c481eb14782e0ae8db94f6f64aacb (patch) | |
tree | 79fd5836c8760a290f9fe89c8fccbb4ac17e8e74 /mail | |
parent | 5ce8bf667d7151dee9a93c8421730c28877be9a5 (diff) | |
download | gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.tar gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.tar.gz gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.tar.bz2 gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.tar.lz gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.tar.xz gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.tar.zst gsoc2013-evolution-309254e2ce5c481eb14782e0ae8db94f6f64aacb.zip |
Bug #683866 - Leaks of EMailFormatter object
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-http-request.c | 11 | ||||
-rw-r--r-- | mail/e-mail-request.c | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c index d6fe5d2254..ffefdaefd1 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -31,7 +31,6 @@ #include <string.h> -#include <em-format/e-mail-formatter.h> #include <shell/e-shell.h> #define d(x) @@ -97,13 +96,11 @@ handle_http_request (GSimpleAsyncResult *res, gboolean force_load_images = FALSE; EMailImageLoadingPolicy image_policy; gchar *uri_md5; - EMailFormatter *formatter; EShell *shell; - + EShellSettings *shell_settings; const gchar *user_cache_dir; CamelDataCache *cache; CamelStream *cache_stream; - GHashTable *query; gint uri_len; @@ -111,8 +108,6 @@ handle_http_request (GSimpleAsyncResult *res, return; } - formatter = e_mail_formatter_new (); - /* Remove the __evo-mail query */ soup_uri = soup_request_get_uri (SOUP_REQUEST (request)); query = soup_form_decode (soup_uri->query); @@ -217,9 +212,11 @@ handle_http_request (GSimpleAsyncResult *res, goto cleanup; } + shell_settings = e_shell_get_shell_settings (shell); + image_policy = e_shell_settings_get_int (shell_settings, "mail-image-loading-policy"); + /* Item not found in cache, but image loading policy allows us to fetch * it from the interwebs */ - image_policy = e_mail_formatter_get_image_loading_policy (formatter); if (!force_load_images && mail_uri && (image_policy == E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES)) { CamelObjectBag *registry; diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c index 37320bc4a3..b0cbedee93 100644 --- a/mail/e-mail-request.c +++ b/mail/e-mail-request.c @@ -163,6 +163,7 @@ handle_mail_request (GSimpleAsyncResult *res, g_free (part_id); g_object_unref (part_list); + g_object_unref (formatter); stream = g_memory_input_stream_new_from_data ( (gchar *) ba->data, ba->len, NULL); |