From: Andreas Färber Date: Sun, 19 Feb 2012 23:49:07 +0000 (+0100) Subject: qom: Fix object_initialize_with_type() assertion X-Git-Tag: v1.1-rc0~352 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=258b2c425813eaff87ee3231beb3719cf1e60397;p=thirdparty%2Fqemu.git qom: Fix object_initialize_with_type() assertion Assert the object is at least sizeof(Object), not sizeof(ObjectClass). Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber Signed-off-by: Anthony Liguori --- diff --git a/qom/object.c b/qom/object.c index 941c291bf91..d858c047052 100644 --- a/qom/object.c +++ b/qom/object.c @@ -264,7 +264,7 @@ void object_initialize_with_type(void *data, TypeImpl *type) Object *obj = data; g_assert(type != NULL); - g_assert(type->instance_size >= sizeof(ObjectClass)); + g_assert(type->instance_size >= sizeof(Object)); type_class_init(type); g_assert(type->abstract == false);