qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).