qom/object: fix iterating properties over a class

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>
This commit is contained in:
Marc-André Lureau 2018-09-06 17:37:36 +04:00
parent 9cbef9d68e
commit 684546d8e9
1 changed files with 1 additions and 1 deletions

View 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,