Skip to content

Commit

Permalink
Fix memory leak on error
Browse files Browse the repository at this point in the history
hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e06
hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in 34f2af3

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>
  • Loading branch information
dongxingshui authored and mstsirkin committed Nov 26, 2015
1 parent 449e357 commit 903a41d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/acpi/memory_hotplug.c
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions hw/ppc/spapr.c
Expand Up @@ -125,6 +125,7 @@ static XICSState *xics_system_init(MachineState *machine,
error_report("kernel_irqchip requested but unavailable: %s",
error_get_pretty(err));
}
error_free(err);
}

if (!icp) {
Expand Down

0 comments on commit 903a41d

Please sign in to comment.