tests: Fix a leak in gdbus-test-codegen test

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 <pwithnall@endlessos.org>

Helps: #2312
This commit is contained in:
Philip Withnall 2022-03-08 20:08:43 +00:00
parent b3a568d19e
commit 0239ae7122

View File

@ -869,7 +869,7 @@ check_bar_proxy (FooiGenBar *proxy,
"s", "a string", "s", "a string",
"o", "/a/path", "o", "/a/path",
"g", "asig", "g", "asig",
"ay", g_variant_new_parsed ("[byte 0x65, 0x67]"), "ay", "eg",
"as", array_of_strings, "as", array_of_strings,
"ao", array_of_objpaths, "ao", array_of_objpaths,
"ag", g_variant_new_parsed ("[@g 'ass', 'git']"), "ag", g_variant_new_parsed ("[@g 'ass', 'git']"),