mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
Add memsets after allocation of all Backend implementors.
Now every struct that implements the Backend trait is completely cleared before we start initialising any of its fields. This will mean I can add new fields that default to 0 or NULL, without having to mess around initialising them explicitly everywhere.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user