From 838e0ec3927f6dea8b00abbd9a6c1d9ce8ff770a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 20 Nov 2013 18:31:57 +0100 Subject: Bug #711499 - Failed image download lefts opened file descriptor --- mail/e-http-request.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mail/e-http-request.c') diff --git a/mail/e-http-request.c b/mail/e-http-request.c index c12fd76ca1..49cdf6058e 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -276,6 +276,7 @@ handle_http_request (GSimpleAsyncResult *res, goto cleanup; } else { d (printf ("Failed to load '%s' from cache.\n", uri)); + g_object_unref (stream); } } @@ -375,7 +376,10 @@ handle_http_request (GSimpleAsyncResult *res, send_and_handle_redirection (session, message, NULL); if (!SOUP_STATUS_IS_SUCCESSFUL (message->status_code)) { - g_warning ("Failed to request %s (code %d)", uri, message->status_code); + g_debug ("Failed to request %s (code %d)", uri, message->status_code); + g_object_unref (message); + g_object_unref (session); + g_main_context_unref (context); goto cleanup; } @@ -409,6 +413,9 @@ handle_http_request (GSimpleAsyncResult *res, "Failed to write data to cache stream: %s", error->message); g_clear_error (&error); + g_object_unref (message); + g_object_unref (session); + g_main_context_unref (context); goto cleanup; } } -- cgit v1.2.3