diff --git a/otherbackends/raw.c b/otherbackends/raw.c index 57130dc6..569d2c62 100644 --- a/otherbackends/raw.c +++ b/otherbackends/raw.c @@ -156,6 +156,7 @@ static char *raw_init(const BackendVtable *vt, Seat *seat, char *loghost; raw = snew(Raw); + memset(raw, 0, sizeof(Raw)); raw->plug.vt = &Raw_plugvt; raw->backend.vt = vt; raw->s = NULL; diff --git a/otherbackends/rlogin.c b/otherbackends/rlogin.c index 4e3abffe..b9b21786 100644 --- a/otherbackends/rlogin.c +++ b/otherbackends/rlogin.c @@ -233,6 +233,7 @@ static char *rlogin_init(const BackendVtable *vt, Seat *seat, char *loghost; rlogin = snew(Rlogin); + memset(rlogin, 0, sizeof(Rlogin)); rlogin->plug.vt = &Rlogin_plugvt; rlogin->backend.vt = vt; rlogin->s = NULL; diff --git a/otherbackends/supdup.c b/otherbackends/supdup.c index 278e689e..3bde828e 100644 --- a/otherbackends/supdup.c +++ b/otherbackends/supdup.c @@ -683,6 +683,7 @@ static char *supdup_init(const BackendVtable *x, Seat *seat, const char *utf8 = "\033%G"; supdup = snew(struct supdup_tag); + memset(supdup, 0, sizeof(Supdup)); supdup->plug.vt = &fn_table; supdup->backend.vt = &supdup_backend; supdup->logctx = logctx; diff --git a/otherbackends/telnet.c b/otherbackends/telnet.c index 0011cf0d..819cbcb0 100644 --- a/otherbackends/telnet.c +++ b/otherbackends/telnet.c @@ -721,6 +721,7 @@ static char *telnet_init(const BackendVtable *vt, Seat *seat, int addressfamily; telnet = snew(Telnet); + memset(telnet, 0, sizeof(Telnet)); telnet->plug.vt = &Telnet_plugvt; telnet->backend.vt = vt; telnet->conf = conf_copy(conf); diff --git a/unix/pty.c b/unix/pty.c index 46382c06..e379e6cf 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -414,6 +414,7 @@ static void pty_open_master(Pty *pty) static Pty *new_pty_struct(void) { Pty *pty = snew(Pty); + memset(pty, 0, sizeof(Pty)); pty->conf = NULL; pty->pending_eof = false; bufchain_init(&pty->output_data); diff --git a/unix/serial.c b/unix/serial.c index 6c8f9b9e..1e20dd20 100644 --- a/unix/serial.c +++ b/unix/serial.c @@ -294,6 +294,7 @@ static char *serial_init(const BackendVtable *vt, Seat *seat, seat_set_trust_status(seat, false); serial = snew(Serial); + memset(serial, 0, sizeof(Serial)); serial->backend.vt = vt; *backend_handle = &serial->backend; diff --git a/windows/conpty.c b/windows/conpty.c index 83cb9635..fd5ef246 100644 --- a/windows/conpty.c +++ b/windows/conpty.c @@ -232,6 +232,7 @@ static char *conpty_init(const BackendVtable *vt, Seat *seat, seat_set_trust_status(seat, false); conpty = snew(ConPTY); + memset(conpty, 0, sizeof(ConPTY)); conpty->pseudoconsole = pcon; pcon_needs_cleanup = false; conpty->outpipe = in_w; diff --git a/windows/serial.c b/windows/serial.c index 82146a40..14a89822 100644 --- a/windows/serial.c +++ b/windows/serial.c @@ -212,6 +212,7 @@ static char *serial_init(const BackendVtable *vt, Seat *seat, seat_set_trust_status(seat, false); serial = snew(Serial); + memset(serial, 0, sizeof(Serial)); serial->port = INVALID_HANDLE_VALUE; serial->out = serial->in = NULL; serial->bufsize = 0;