提交 327d83ba 编写于 作者: P Paolo Bonzini 提交者: Gerd Hoffmann

gtk: fix uninitialized temporary VirtualConsole

Only the echo field is used in the temporary VirtualConsole, so the
damage was limited.  But still, if echo was incorrectly set to true,
the result would be some puzzling output in VTE monitor and serial
consoles.

Fixes: fba958c6
Cc: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Message-id: 1455015557-15106-2-git-send-email-pbonzini@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 c3bce9d5
......@@ -1613,7 +1613,7 @@ static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp)
chr->chr_set_echo = gd_vc_chr_set_echo;
/* Temporary, until gd_vc_vte_init runs. */
chr->opaque = g_new(VirtualConsole, 1);
chr->opaque = g_new0(VirtualConsole, 1);
/* defer OPENED events until our vc is fully initialized */
chr->explicit_be_open = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册