diff options
author | Andreas Färber <afaerber@suse.de> | 2012-02-20 00:49:07 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-22 09:02:19 -0600 |
commit | 258b2c425813eaff87ee3231beb3719cf1e60397 (patch) | |
tree | b567b5b09956bbbb615e64f8825ea4379e412acc /qom | |
parent | d5f27e88699f14c802d66c01de70e5ea37b7153a (diff) | |
download | qemu-258b2c425813eaff87ee3231beb3719cf1e60397.zip qemu-258b2c425813eaff87ee3231beb3719cf1e60397.tar.gz qemu-258b2c425813eaff87ee3231beb3719cf1e60397.tar.bz2 |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c index 941c291..d858c04 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); |