mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 20:12:48 -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:
@ -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;
|
||||
|
Reference in New Issue
Block a user