diff options
author | Liang Yan <lyan@suse.com> | 2017-09-22 18:55:33 -0400 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-09-26 09:11:22 +0300 |
commit | 98e8790326d732fc79f0c133d9658f4761ba9cb7 (patch) | |
tree | 8f17d68e310c1b72d3cad72b545b3698a77e1cef /chardev/baum.c | |
parent | a295d244e575c4e44432e26bfd4634a8dcbf48d7 (diff) |
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/baum.c')
-rw-r--r-- | chardev/baum.c | 1 |
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; |