summaryrefslogtreecommitdiffstats
path: root/qom/object.c
diff options
context:
space:
mode:
authorAndreas Färber2012-02-20 00:49:07 +0100
committerAnthony Liguori2012-02-22 16:02:19 +0100
commit258b2c425813eaff87ee3231beb3719cf1e60397 (patch)
treeb567b5b09956bbbb615e64f8825ea4379e412acc /qom/object.c
parentpci: set memory type for memory behind the bridge (diff)
downloadqemu-258b2c425813eaff87ee3231beb3719cf1e60397.tar.gz
qemu-258b2c425813eaff87ee3231beb3719cf1e60397.tar.xz
qemu-258b2c425813eaff87ee3231beb3719cf1e60397.zip
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/object.c')
-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);