diff options
author | Dan Winship <danw@gnome.org> | 2012-12-11 17:34:06 +0100 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-12-11 17:34:06 +0100 |
commit | db084cb64d226afc8489386c7e3f45e6f584e43c (patch) | |
tree | 3b8fac70eaa6239928d87348850e4abae2d3d8ef /tests/sniffing-test.c | |
parent | a2a4fccfa8ebd09aea232913eaa3bf1752038e40 (diff) | |
download | libsoup-db084cb64d226afc8489386c7e3f45e6f584e43c.tar.gz |
tests: fix memory leaks
Diffstat (limited to 'tests/sniffing-test.c')
-rw-r--r-- | tests/sniffing-test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c index e77154e1..ab8099da 100644 --- a/tests/sniffing-test.c +++ b/tests/sniffing-test.c @@ -384,8 +384,10 @@ test_sniffing (const char *path, const char *expected_type) req = soup_session_request_uri (session, uri, NULL); stream = soup_test_request_send (req, NULL, &error); - if (stream) + if (stream) { soup_test_request_close_stream (req, stream, NULL, &error); + g_object_unref (stream); + } if (error) { debug_printf (1, " request failed: %s\n", error->message); g_clear_error (&error); @@ -436,8 +438,10 @@ test_disabled (const char *path) req = soup_session_request_uri (session, uri, NULL); soup_request_disable_feature (req, SOUP_TYPE_CONTENT_SNIFFER); stream = soup_test_request_send (req, NULL, &error); - if (stream) + if (stream) { soup_test_request_close_stream (req, stream, NULL, &error); + g_object_unref (stream); + } if (error) { debug_printf (1, " request failed: %s\n", error->message); g_clear_error (&error); |