summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-02-09 11:59:16 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:30 -0600
commit800a4b7f91a7ccd24d4ff22550392349eb54b583 (patch)
tree0f0037c469d15017962c0e999161740bfcfa5bd5
parent0f2e60d82b7819f2c52e16b48cc44728836f02b5 (diff)
downloadhqemu-800a4b7f91a7ccd24d4ff22550392349eb54b583.zip
hqemu-800a4b7f91a7ccd24d4ff22550392349eb54b583.tar.gz
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: fba958c692e47a373d15c1fd3d72b255bf76adbd Cc: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1455015557-15106-2-git-send-email-pbonzini@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--ui/gtk.c2
1 files changed, 1 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud