[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initializ
From: |
Daniel P . Berrangé |
Subject: |
[Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initialized |
Date: |
Wed, 23 Jan 2019 17:27:40 +0000 |
valgrind on the test-char.c code reports that 'struct termios' contains
uninitialized memory.
Signed-off-by: Daniel P. Berrangé <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
--
2.20.1
- [Qemu-devel] [PATCH v2 06/16] chardev: remove many local variables in qemu_chr_parse_socket, (continued)
- [Qemu-devel] [PATCH v2 06/16] chardev: remove many local variables in qemu_chr_parse_socket, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 12/16] chardev: honour the reconnect setting in tcp_chr_wait_connected, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 07/16] chardev: ensure qemu_chr_parse_compat reports missing driver error, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 09/16] chardev: split tcp_chr_wait_connected into two methods, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 08/16] chardev: remove unused 'sioc' variable & cleanup paths, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 10/16] chardev: split up qmp_chardev_open_socket connection code, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 11/16] chardev: use a state machine for socket connection state, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 13/16] chardev: disallow TLS/telnet/websocket with tcp_chr_wait_connected, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 14/16] chardev: fix race with client connections in tcp_chr_wait_connected, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 15/16] tests: expand coverage of socket chardev test, Daniel P . Berrangé, 2019/01/23
- [Qemu-devel] [PATCH v2 16/16] chardev: ensure termios is fully initialized,
Daniel P . Berrangé <=