[evolution/gnome-3-8] Bug #705119 - File descriptors for images not closed
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-8] Bug #705119 - File descriptors for images not closed
- Date: Tue, 30 Jul 2013 10:33:15 +0000 (UTC)
commit 05d0c5f26019eddee1cad15cd7792704902cb148
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 30 12:32:48 2013 +0200
Bug #705119 - File descriptors for images not closed
mail/e-http-request.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index e77a4e5..b5ac480 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -378,16 +378,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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]