aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-07-13 12:45:50 +0200
committerMarc-André Lureau <marcandre.lureau@redhat.com>2016-09-08 18:05:21 +0400
commit8ea753718b2d1a42e9ce7b8db9f5e4e1f330e827 (patch)
treee949152c08dcb3503da62ff65fcd677e478fb57f /hw
parentac64c5fdf8c1e470cfca94d7ad5686770e6e470a (diff)
downloadqemu-8ea753718b2d1a42e9ce7b8db9f5e4e1f330e827.zip
qemu-8ea753718b2d1a42e9ce7b8db9f5e4e1f330e827.tar.gz
qemu-8ea753718b2d1a42e9ce7b8db9f5e4e1f330e827.tar.bz2
machine: use class base init generated name
machine_class_base_init() member name is allocated by machine_class_base_init(), but not freed by machine_class_finalize(). Simply freeing there doesn't work, because DEFINE_PC_MACHINE() overwrites it with a literal string. Fix DEFINE_PC_MACHINE() not to overwrite it, and add the missing free to machine_class_finalize(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/machine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index e5a456f..00fbe3e 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -561,6 +561,7 @@ static void machine_class_finalize(ObjectClass *klass, void *data)
if (mc->compat_props) {
g_array_free(mc->compat_props, true);
}
+ g_free(mc->name);
}
void machine_register_compat_props(MachineState *machine)