[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] chardev/baum: fix baum that releases brlapi t
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-trivial] [PATCH] chardev/baum: fix baum that releases brlapi twice |
Date: |
Sun, 24 Sep 2017 12:56:11 -0400 (EDT) |
----- Original Message -----
> Error process of baum_chr_open needs to set brlapi null, so it won't
> get released twice in char_braille_finalize, which will cause
> "/usr/bin/qemu-system-x86_64: double free or corruption (!prev)"
>
> Signed-off-by: Liang Yan <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
> ---
> chardev/baum.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/chardev/baum.c b/chardev/baum.c
> index 302dd9666c..67fd783a59 100644
> --- a/chardev/baum.c
> +++ b/chardev/baum.c
> @@ -643,6 +643,7 @@ static void baum_chr_open(Chardev *chr,
> error_setg(errp, "brlapi__openConnection: %s",
> brlapi_strerror(brlapi_error_location()));
> g_free(handle);
> + baum->brlapi = NULL;
> return;
> }
> baum->deferred_init = 0;
> --
> 2.14.1
>
>