Child and link properties get serialized as QOM paths, i.e. as
strings.  Use &str_type_info for them.

Signed-off-by: Markus Armbruster <[email protected]>
---
 qom/object.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 774a976c8b..9276b7a435 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1914,7 +1914,7 @@ object_property_try_add_child(Object *obj, const char 
*name,
 
     type = g_strdup_printf("child<%s>", object_get_typename(child));
 
-    op = object_property_try_add(obj, name, type, NULL,
+    op = object_property_try_add(obj, name, type, &str_type_info,
                                  object_get_child_property,
                                  NULL, object_finalize_child_property,
                                  child, errp);
@@ -2109,7 +2109,7 @@ object_add_link_prop(Object *obj, const char *name,
 
     full_type = g_strdup_printf("link<%s>", type);
 
-    op = object_property_add(obj, name, full_type, NULL,
+    op = object_property_add(obj, name, full_type, &str_type_info,
                              object_get_link_property,
                              check ? object_set_link_property : NULL,
                              object_release_link_property,
@@ -2146,7 +2146,7 @@ object_class_property_add_link(ObjectClass *oc,
 
     full_type = g_strdup_printf("link<%s>", type);
 
-    op = object_class_property_add(oc, name, full_type, NULL,
+    op = object_class_property_add(oc, name, full_type, &str_type_info,
                                    object_get_link_property,
                                    check ? object_set_link_property : NULL,
                                    object_release_link_property,
-- 
2.55.0


Reply via email to