From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:50561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtGHH-0000Mm-2t for qemu-devel@nongnu.org; Mon, 11 Feb 2019 13:25:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtGHD-00089S-Sr for qemu-devel@nongnu.org; Mon, 11 Feb 2019 13:25:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16239) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtGHD-00086i-21 for qemu-devel@nongnu.org; Mon, 11 Feb 2019 13:25:55 -0500 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 11 Feb 2019 18:24:42 +0000 Message-Id: <20190211182442.8542-17-berrange@redhat.com> In-Reply-To: <20190211182442.8542-1-berrange@redhat.com> References: <20190211182442.8542-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3 16/16] chardev: ensure termios is fully initialized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yongji Xie , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Thomas Huth , Laurent Vivier valgrind on the test-char.c code reports that 'struct termios' contains uninitialized memory. Signed-off-by: Daniel P. Berrang=C3=A9 --- chardev/char-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-serial.c b/chardev/char-serial.c index 3299b46853..a8bae31b8d 100644 --- a/chardev/char-serial.c +++ b/chardev/char-serial.c @@ -57,7 +57,7 @@ static void qmp_chardev_open_serial(Chardev *chr, static void tty_serial_init(int fd, int speed, int parity, int data_bits, int stop_bits) { - struct termios tty; + struct termios tty =3D {0}; speed_t spd; =20 #if 0 --=20 2.20.1