qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/1] gtk: fix uninitialized temporary VirtualConsole


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 1/1] gtk: fix uninitialized temporary VirtualConsole
Date: Mon, 22 Feb 2016 09:32:10 +0100

From: Paolo Bonzini <address@hidden>

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 <address@hidden>
Tested-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 ui/gtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/gtk.c b/ui/gtk.c
index 2b46965..3773826 100644
--- 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;
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]