diff options
-rw-r--r-- | mail/e-http-request.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c index c85a26810e..534e30bff6 100644 --- a/mail/e-http-request.c +++ b/mail/e-http-request.c @@ -283,7 +283,7 @@ handle_http_request (GSimpleAsyncResult *res, /* Set result and quit the thread */ g_simple_async_result_set_op_res_gpointer ( - res, stream, NULL); + res, stream, g_object_unref); goto cleanup; } else { @@ -446,7 +446,7 @@ handle_http_request (GSimpleAsyncResult *res, uri, priv->content_type, priv->content_length, uri_md5)); - g_simple_async_result_set_op_res_gpointer (res, stream, NULL); + g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref); goto cleanup; } @@ -541,6 +541,8 @@ http_request_send_finish (SoupRequest *request, if (!stream) /* We must always return something */ stream = g_memory_input_stream_new (); + else + g_object_ref (stream); return stream; } |