chardev/baum: fix baum that releases brlapi twice
PATCH 1/1 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 <[email protected]>
--- chardev/baum.c | 1 + 1 file changed, 1 insertion(+)
chardev/baum.c +1 -0
@@ -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 ;
Signature · 1 line
2.14.1
----- Original Message -----
Quoted 5 lines
Error process of
baum_chr_openneeds to set brlapi null, so it won't get released twice inchar_braille_finalize, which will cause "/usr/bin/qemu-system-x86_64: double free or corruption (!prev)"Signed-off-by Liang Yan <[email protected]>
Reviewed-by Marc-André Lureau <[email protected]>
Quoted 20 lines
--- chardev/baum.c | 1 + 1 file changed, 1 insertion(+)chardev/baum.c +1
-1@@ -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
Michael Tokarev
AppliedQuoted 3 lines · Liang Yan
Error process of
baum_chr_openneeds to set brlapi null, so it won't get released twice inchar_braille_finalize, which will cause "/usr/bin/qemu-system-x86_64: double free or corruption (!prev)"
Applied to -trivial, thanks!
/mjt