mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:56:38 +00:00
ui/vt100: add vt100_fini() check
vt100_fini() is called unconditonally from qemu_text_console_finalize(),
but it may not have been vt100_init()/opened: fix the crash in that case.
Fixes: 8fa294482e ("ui/console-vc: move VT100 state machine ...")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
@@ -978,6 +978,9 @@ void vt100_init(QemuVT100 *vt,
|
||||
|
||||
void vt100_fini(QemuVT100 *vt)
|
||||
{
|
||||
if (!QTAILQ_IN_USE(vt, list)) {
|
||||
return;
|
||||
}
|
||||
QTAILQ_REMOVE(&vt100s, vt, list);
|
||||
fifo8_destroy(&vt->out_fifo);
|
||||
g_free(vt->cells);
|
||||
|
||||
Reference in New Issue
Block a user