* [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice
@ 2017-09-22 22:55 Liang Yan
2017-09-24 16:56 ` Marc-André Lureau
2017-09-24 20:49 ` Michael Tokarev
0 siblings, 2 replies; 3+ messages in thread
From: Liang Yan @ 2017-09-22 22:55 UTC (permalink / raw)
To: samuel.thibault, pbonzini, marcandre.lureau; +Cc: qemu-devel, qemu-trivial
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 <lyan@suse.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice
2017-09-22 22:55 [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice Liang Yan
@ 2017-09-24 16:56 ` Marc-André Lureau
2017-09-24 20:49 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2017-09-24 16:56 UTC (permalink / raw)
To: Liang Yan; +Cc: samuel thibault, pbonzini, qemu-devel, qemu-trivial
----- 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 <lyan@suse.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice
2017-09-22 22:55 [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice Liang Yan
2017-09-24 16:56 ` Marc-André Lureau
@ 2017-09-24 20:49 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2017-09-24 20:49 UTC (permalink / raw)
To: Liang Yan, samuel.thibault, pbonzini, marcandre.lureau
Cc: qemu-trivial, qemu-devel
23.09.2017 01:55, Liang Yan wrote:
> 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)"
Applied to -trivial, thanks!
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-24 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 22:55 [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice Liang Yan
2017-09-24 16:56 ` Marc-André Lureau
2017-09-24 20:49 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.