aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-07-30 18:32:15 +0800
committerMilan Crha <mcrha@redhat.com>2013-07-30 18:32:15 +0800
commit77a825c69316fbe58dd01343845e9eab0e35a9a2 (patch)
tree28c8aa179cea6bcd2c8abcbeea05e4021870f4ef /mail
parente9c6ceda77ad0849bdd6798285d1fe48334a57f9 (diff)
downloadgsoc2013-evolution-77a825c69316fbe58dd01343845e9eab0e35a9a2.tar.gz
gsoc2013-evolution-77a825c69316fbe58dd01343845e9eab0e35a9a2.tar.zst
gsoc2013-evolution-77a825c69316fbe58dd01343845e9eab0e35a9a2.zip
Bug #705119 - File descriptors for images not closed
Diffstat (limited to 'mail')
-rw-r--r--mail/e-http-request.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index fb516f98ba..a4a35567ed 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -379,16 +379,18 @@ handle_http_request (GSimpleAsyncResult *res,
camel_stream_write (
cache_stream, message->response_body->data,
message->response_body->length, cancellable, &error);
+
+ camel_stream_close (cache_stream, cancellable, NULL);
+ g_object_unref (cache_stream);
+
if (error != NULL) {
- g_warning (
- "Failed to write data to cache stream: %s",
- error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ g_warning (
+ "Failed to write data to cache stream: %s",
+ error->message);
g_clear_error (&error);
goto cleanup;
}
-
- camel_stream_close (cache_stream, cancellable, NULL);
- g_object_unref (cache_stream);
}
/* Send the response body to WebKit */