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>
This commit is contained in:
parent
a295d244e5
commit
98e8790326
@ -643,6 +643,7 @@ static void baum_chr_open(Chardev *chr,
|
|||||||
error_setg(errp, "brlapi__openConnection: %s",
|
error_setg(errp, "brlapi__openConnection: %s",
|
||||||
brlapi_strerror(brlapi_error_location()));
|
brlapi_strerror(brlapi_error_location()));
|
||||||
g_free(handle);
|
g_free(handle);
|
||||||
|
baum->brlapi = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
baum->deferred_init = 0;
|
baum->deferred_init = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user