summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-qobject-output-visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-qobject-output-visitor.c')
-rw-r--r--tests/unit/test-qobject-output-visitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test-qobject-output-visitor.c b/tests/unit/test-qobject-output-visitor.c
index 34d67a439a..6af4c33eec 100644
--- a/tests/unit/test-qobject-output-visitor.c
+++ b/tests/unit/test-qobject-output-visitor.c
@@ -338,7 +338,7 @@ static void test_visitor_out_union_flat(TestOutputVisitorData *data,
{
QDict *qdict;
- UserDefFlatUnion *tmp = g_malloc0(sizeof(UserDefFlatUnion));
+ UserDefFlatUnion *tmp = g_new0(UserDefFlatUnion, 1);
tmp->enum1 = ENUM_ONE_VALUE1;
tmp->string = g_strdup("str");
tmp->integer = 41;