mirror of https://github.com/xemu-project/xemu.git
Fix memory leak on error
hw/ppc/spapr.c: Fix memory leak on error, it was introduced inbc09e0611
hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in34f2af3d
Signed-off-by: Stefano Dong (董兴水) <opensource.dxs@aliyun.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
449e357810
commit
903a41d341
|
@ -155,6 +155,7 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data,
|
||||||
qapi_event_send_mem_unplug_error(dev->id,
|
qapi_event_send_mem_unplug_error(dev->id,
|
||||||
error_get_pretty(local_err),
|
error_get_pretty(local_err),
|
||||||
&error_abort);
|
&error_abort);
|
||||||
|
error_free(local_err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
trace_mhp_acpi_pc_dimm_deleted(mem_st->selector);
|
trace_mhp_acpi_pc_dimm_deleted(mem_st->selector);
|
||||||
|
|
|
@ -125,6 +125,7 @@ static XICSState *xics_system_init(MachineState *machine,
|
||||||
error_report("kernel_irqchip requested but unavailable: %s",
|
error_report("kernel_irqchip requested but unavailable: %s",
|
||||||
error_get_pretty(err));
|
error_get_pretty(err));
|
||||||
}
|
}
|
||||||
|
error_free(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!icp) {
|
if (!icp) {
|
||||||
|
|
Loading…
Reference in New Issue