diff options
author | Dan Winship <danw@src.gnome.org> | 2008-12-11 19:19:08 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2008-12-11 19:19:08 +0000 |
commit | ee9b0a42c582a38eddba244a6630ec5c560b12e6 (patch) | |
tree | 783c2ed99e5b95ac159cdbf63f020466ee2aa861 /daemon/gvfsbackendhttp.c | |
parent | 9f6f4f974ef5a16bbad3c03bcbbf23ca27e3bf79 (diff) | |
download | gvfs-ee9b0a42c582a38eddba244a6630ec5c560b12e6.tar.gz |
don't leak GSimpleAsyncResults. #551075.
* daemon/soup-input-stream.c (read_async_done)
(soup_input_stream_read_async, soup_input_stream_close_async):
don't leak GSimpleAsyncResults. #551075.
* daemon/gvfsbackendhttp.c (try_open_for_read): set_accumulate to
FALSE on the response body to avoid extra allocating+freeing.
Patch from Peter Christoffersen, part of #551075.
(open_for_read_ready): unref the stream on error.
svn path=/trunk/; revision=2130
Diffstat (limited to 'daemon/gvfsbackendhttp.c')
-rw-r--r-- | daemon/gvfsbackendhttp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c index 04501e99..332c962a 100644 --- a/daemon/gvfsbackendhttp.c +++ b/daemon/gvfsbackendhttp.c @@ -346,6 +346,7 @@ open_for_read_ready (GObject *source_object, error->message); g_error_free (error); + g_object_unref (stream); return; } @@ -371,6 +372,8 @@ try_open_for_read (GVfsBackend *backend, msg = soup_message_new_from_uri (SOUP_METHOD_GET, uri); soup_uri_free (uri); + soup_message_body_set_accumulate (msg->response_body, FALSE); + stream = soup_input_stream_new (op_backend->session_async, msg); g_object_unref (msg); |