hw/ppc/spapr: fix spapr->kvm_type leak
Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> [fixed return type of spapr_machine_finalizefn()] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
215e209846
commit
87bbdd9caf
@ -2108,6 +2108,13 @@ static void spapr_machine_initfn(Object *obj)
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void spapr_machine_finalizefn(Object *obj)
|
||||||
|
{
|
||||||
|
sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
|
||||||
|
|
||||||
|
g_free(spapr->kvm_type);
|
||||||
|
}
|
||||||
|
|
||||||
static void ppc_cpu_do_nmi_on_cpu(void *arg)
|
static void ppc_cpu_do_nmi_on_cpu(void *arg)
|
||||||
{
|
{
|
||||||
CPUState *cs = arg;
|
CPUState *cs = arg;
|
||||||
@ -2302,6 +2309,7 @@ static const TypeInfo spapr_machine_info = {
|
|||||||
.abstract = true,
|
.abstract = true,
|
||||||
.instance_size = sizeof(sPAPRMachineState),
|
.instance_size = sizeof(sPAPRMachineState),
|
||||||
.instance_init = spapr_machine_initfn,
|
.instance_init = spapr_machine_initfn,
|
||||||
|
.instance_finalize = spapr_machine_finalizefn,
|
||||||
.class_size = sizeof(sPAPRMachineClass),
|
.class_size = sizeof(sPAPRMachineClass),
|
||||||
.class_init = spapr_machine_class_init,
|
.class_init = spapr_machine_class_init,
|
||||||
.interfaces = (InterfaceInfo[]) {
|
.interfaces = (InterfaceInfo[]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user