aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-02-20 00:49:07 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-22 09:02:19 -0600
commit258b2c425813eaff87ee3231beb3719cf1e60397 (patch)
treeb567b5b09956bbbb615e64f8825ea4379e412acc /qom
parentd5f27e88699f14c802d66c01de70e5ea37b7153a (diff)
qom: Fix object_initialize_with_type() assertion
Assert the object is at least sizeof(Object), not sizeof(ObjectClass). Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c
index 941c291bf9..d858c04705 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);