[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v2 18/25] chardev: ensure termios is fully initialize

From: Marc-André Lureau
Subject: [Qemu-devel] [PULL v2 18/25] chardev: ensure termios is fully initialized
Date: Wed, 13 Feb 2019 17:19:06 +0100

From: Daniel P. Berrangé <address@hidden>

valgrind on the test-char.c code reports that 'struct termios' contains
uninitialized memory.

Signed-off-by: Daniel P. Berrangé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Marc-André Lureau <address@hidden>
 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 = {0};
     speed_t spd;
 #if 0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]