[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc: fix double-free in cpu_post_loa
From: |
Eric Blake |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc: fix double-free in cpu_post_load() |
Date: |
Wed, 2 Aug 2017 12:49:37 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/02/2017 12:34 PM, Greg Kurz wrote:
> 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 <address@hidden>
> ---
> target/ppc/machine.c | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
>
> diff --git a/target/ppc/machine.c b/target/ppc/machine.c
> index f578156dd411..abe0a1cdf021 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
>
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature