@@ -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)
@@ -93,7 +93,7 @@ struct MachineClass {
/*< public >*/
const char *family; /* NULL iff @name identifies a standalone machtype */
- const char *name;
+ char *name;
const char *alias;
const char *desc;
@@ -903,7 +903,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
{ \
MachineClass *mc = MACHINE_CLASS(oc); \
optsfn(mc); \
- mc->name = namestr; \
mc->init = initfn; \
} \
static const TypeInfo pc_machine_type_##suffix = { \