1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Milan Crha <mcrha@redhat.com>
Date: Thu, 22 May 2025 10:46:20 +0200
Subject: misc-test: Fix two memory leaks
It's tested it returned the data/object, but it was not freed.
Origin: upstream, 3.7.0, commit:83e26e9001b500cc09ae52cef258195303fe32da
---
tests/misc-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/misc-test.c b/tests/misc-test.c
index 130d9e5..481eff7 100644
--- a/tests/misc-test.c
+++ b/tests/misc-test.c
@@ -156,6 +156,7 @@ do_host_big_header (void)
stream = soup_session_send (session, msg, NULL, &error);
g_assert_null (stream);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CONNECTION_CLOSED);
+ g_clear_error (&error);
soup_test_session_abort_unref (session);
@@ -846,6 +847,7 @@ redirect_handler (SoupMessage *msg,
g_assert_nonnull (body);
g_assert_cmpstr (g_bytes_get_data (body, NULL), ==, "index");
g_object_unref (new_msg);
+ g_bytes_unref (body);
}
static void
|