From: Daniel P. Berrangé Date: Mon, 11 Feb 2019 18:24:42 +0000 (+0000) Subject: chardev: ensure termios is fully initialized X-Git-Tag: v4.0.0-rc0~100^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=211ef6c4b6297a6275015c16b76bc72de35c56c3;p=thirdparty%2Fqemu.git chardev: ensure termios is fully initialized valgrind on the test-char.c code reports that 'struct termios' contains uninitialized memory. Signed-off-by: Daniel P. Berrangé Message-Id: <20190211182442.8542-17-berrange@redhat.com> Signed-off-by: Marc-André Lureau --- diff --git a/chardev/char-serial.c b/chardev/char-serial.c index 3299b468530..a8bae31b8dd 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 = {0}; speed_t spd; #if 0