summaryrefslogtreecommitdiffstats
path: root/hw/acpi/memory_hotplug.c
diff options
context:
space:
mode:
authorStefano Dong (董兴水)2015-11-26 13:00:12 +0100
committerMichael S. Tsirkin2015-11-26 13:27:52 +0100
commit903a41d3415960240cb3b9f1d66f3707b27010d6 (patch)
tree23329c048e919074e221a02d7126be1f8ea703d0 /hw/acpi/memory_hotplug.c
parentRevert "vhost: send SET_VRING_ENABLE at start/stop" (diff)
downloadqemu-903a41d3415960240cb3b9f1d66f3707b27010d6.tar.gz
qemu-903a41d3415960240cb3b9f1d66f3707b27010d6.tar.xz
qemu-903a41d3415960240cb3b9f1d66f3707b27010d6.zip
Fix memory leak on error
hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611 hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in 34f2af3d 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>
Diffstat (limited to 'hw/acpi/memory_hotplug.c')
-rw-r--r--hw/acpi/memory_hotplug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ce428dfc18..e4b9a01f80 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -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,
error_get_pretty(local_err),
&error_abort);
+ error_free(local_err);
break;
}
trace_mhp_acpi_pc_dimm_deleted(mem_st->selector);