]> Git Repo - qemu.git/commitdiff
gtk: fix uninitialized temporary VirtualConsole
authorPaolo Bonzini <[email protected]>
Tue, 9 Feb 2016 10:59:16 +0000 (11:59 +0100)
committerGerd Hoffmann <[email protected]>
Mon, 22 Feb 2016 07:38:42 +0000 (08:38 +0100)
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: fba958c692e47a373d15c1fd3d72b255bf76adbd
Cc: Gerd Hoffmann <[email protected]>
Tested-by: Mark Cave-Ayland <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: 1455015557[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
ui/gtk.c

index 2b46965f8003f993d5220e84bbed07d055a96e43..37738262778f69a8c5efe2b0e679e8be3b038a5a 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -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;
This page took 0.027578 seconds and 4 git commands to generate.