From patchwork Tue Feb 9 10:59:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8260011 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 455269F38B for ; Tue, 9 Feb 2016 11:01:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9236F2026C for ; Tue, 9 Feb 2016 11:01:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D69C12024C for ; Tue, 9 Feb 2016 11:01:03 +0000 (UTC) Received: from localhost ([::1]:54318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT62Z-0004Sr-D2 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Feb 2016 06:01:03 -0500 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) Received: from donizetti.redhat.com (ovpn-112-47.ams2.redhat.com [10.36.112.47]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u19AxIo8001398; Tue, 9 Feb 2016 05:59:20 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 9 Feb 2016 11:59:16 +0100 Message-Id: <1455015557-15106-2-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH] gtk: fix uninitialized temporary VirtualConsole X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;