Received: from eggs.gnu.org ([2001:4830:134:3::10]:52330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT60x-0002Ju-O6 for qemu-devel@nongnu.org; Tue, 09 Feb 2016 05:59:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT60w-000222-1I for qemu-devel@nongnu.org; Tue, 09 Feb 2016 05:59:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT60v-00021y-Rn for qemu-devel@nongnu.org; Tue, 09 Feb 2016 05:59:21 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5C7DDC0C234B for ; Tue, 9 Feb 2016 10:59:21 +0000 (UTC) From: Paolo Bonzini Date: Tue, 9 Feb 2016 11:59:16 +0100 Message-Id: <1455015557-15106-2-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] gtk: fix uninitialized temporary VirtualConsole List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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 Tested-by: Mark Cave-Ayland Signed-off-by: Paolo Bonzini --- 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; -- 2.5.0