]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qom/object: fix iterating properties over a class
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Sep 2018 13:37:36 +0000 (17:37 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 5 Oct 2018 12:14:22 +0000 (16:14 +0400)
object_class_property_iter_init() starts from the given class, so the
next class should continue with the parent class.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
qom/object.c

index 9222b23172713f51f111aa20064958b264d0cf28..9eaf08a53c378da7f5d952bc847dd32137153946 100644 (file)
@@ -1115,7 +1115,7 @@ void object_class_property_iter_init(ObjectPropertyIterator *iter,
                                      ObjectClass *klass)
 {
     g_hash_table_iter_init(&iter->iter, klass->properties);
-    iter->nextclass = klass;
+    iter->nextclass = object_class_get_parent(klass);
 }
 
 ObjectProperty *object_class_property_find(ObjectClass *klass, const char *name,