qom: Fix object_class_foreach()
PATCH 1/1 qom: Fix object_class_foreach()
The TypeImpl was passed as ObjectClass and the ObjectClass as opaque, leading to segfault when dereferencing the caller-supplied opaque.
Signed-off-by Andreas Färber <[email protected]>
Cc Anthony Liguori <[email protected]>
--- qom/object.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
qom/object.c +1 -1
@@ -478,7 +478,7 @@ static void object_class_foreach_tramp(gpointer key, gpointer value,type_class_init (type); - data->fn (value, type->class); + data->fn (type->class, data->opaque); } void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque),
Signature · 1 line
1.7.7