summaryrefslogtreecommitdiffstats
path: root/chardev
diff options
context:
space:
mode:
authorLiang Yan2017-09-23 00:55:33 +0200
committerMichael Tokarev2017-09-26 08:11:22 +0200
commit98e8790326d732fc79f0c133d9658f4761ba9cb7 (patch)
tree8f17d68e310c1b72d3cad72b545b3698a77e1cef /chardev
parentremove trailing whitespace from qemu-options.hx (diff)
downloadqemu-98e8790326d732fc79f0c133d9658f4761ba9cb7.tar.gz
qemu-98e8790326d732fc79f0c133d9658f4761ba9cb7.tar.xz
qemu-98e8790326d732fc79f0c133d9658f4761ba9cb7.zip
chardev/baum: fix baum that releases brlapi twice
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> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'chardev')
-rw-r--r--chardev/baum.c1
1 files changed, 1 insertions, 0 deletions
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;