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>
This commit is contained in:
Greg Kurz 2017-08-02 19:34:16 +02:00 committed by David Gibson
parent 89fca22f21
commit e7bab9a256
1 changed files with 0 additions and 1 deletions

View File

@ -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