summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGreg Kurz2017-08-02 19:34:16 +0200
committerDavid Gibson2017-08-09 03:46:44 +0200
commite7bab9a256d653948760ef9f3d04f14eb2a81731 (patch)
tree83ae0192408a0add024a7b84a1d59872b52922ce /target
parentbooke206: fix MAS update on tlb miss (diff)
downloadqemu-e7bab9a256d653948760ef9f3d04f14eb2a81731.tar.gz
qemu-e7bab9a256d653948760ef9f3d04f14eb2a81731.tar.xz
qemu-e7bab9a256d653948760ef9f3d04f14eb2a81731.zip
ppc: fix double-free in cpu_post_load()
When running nested with KVM PR, ppc_set_compat() fails and QEMU crashes because of "double free or corruption (!prev)". The crash happens because error_report_err() has already called error_free(). Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target')
-rw-r--r--target/ppc/machine.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index f578156dd4..abe0a1cdf0 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -239,7 +239,6 @@ static int cpu_post_load(void *opaque, int version_id)
ppc_set_compat(cpu, cpu->compat_pvr, &local_err);
if (local_err) {
error_report_err(local_err);
- error_free(local_err);
return -1;
}
} else