[glib: 1/4] tests: Fix a leak in gdbus-test-codegen test
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/4] tests: Fix a leak in gdbus-test-codegen test
- Date: Thu, 17 Mar 2022 15:12:09 +0000 (UTC)
commit 0239ae7122cfe01cd213a5afbeec2696e035a001
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Mar 8 20:08:43 2022 +0000
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
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']"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]