aboutsummaryrefslogtreecommitdiff
path: root/chardev
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2019-02-11 18:24:42 +0000
committerMarc-André Lureau <marcandre.lureau@redhat.com>2019-02-12 17:35:56 +0100
commit211ef6c4b6297a6275015c16b76bc72de35c56c3 (patch)
tree6a2830817bd79c5dfbd48ca44387aa9f38d95bee /chardev
parent9baa6802fe55ea83dc8723bd7efcf633992a3e15 (diff)
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é <berrange@redhat.com> Message-Id: <20190211182442.8542-17-berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'chardev')
-rw-r--r--chardev/char-serial.c2
1 files changed, 1 insertions, 1 deletions
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