From 0239ae7122cfe01cd213a5afbeec2696e035a001 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 8 Mar 2022 20:08:43 +0000 Subject: [PATCH] tests: Fix a leak in gdbus-test-codegen test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `ay` property has type `string` (see the generated code) since it’s not been annotated to force accepting a `GVariant`. This means the GObject property machinery expects a string, and calls `g_strdup()` on the passed-in pointer, rather than sinking the `GVariant`. Signed-off-by: Philip Withnall Helps: #2312 --- gio/tests/gdbus-test-codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c index 0681e7ec8..0701f50f1 100644 --- a/gio/tests/gdbus-test-codegen.c +++ b/gio/tests/gdbus-test-codegen.c @@ -869,7 +869,7 @@ check_bar_proxy (FooiGenBar *proxy, "s", "a string", "o", "/a/path", "g", "asig", - "ay", g_variant_new_parsed ("[byte 0x65, 0x67]"), + "ay", "eg", "as", array_of_strings, "ao", array_of_objpaths, "ag", g_variant_new_parsed ("[@g 'ass', 'git']"),