mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
Fix stale-pointer bugs in connection-fatal network errors.
I think these began to appear as a consequencce of replacing fatalbox() calls with more sensible error reports: the more specific a direction I send a report in, the greater the annoying possibility of re-entrance when the resulting error handler starts closing stuff.
This commit is contained in:
@ -1431,8 +1431,10 @@ static void net_select_result(int fd, int event)
|
||||
while (err && s->addr && sk_nextaddr(s->addr, &s->step)) {
|
||||
err = try_connect(s);
|
||||
}
|
||||
if (err)
|
||||
if (err) {
|
||||
plug_closing(s->plug, strerror(err), err, 0);
|
||||
return; /* socket is now presumably defunct */
|
||||
}
|
||||
if (!s->connected)
|
||||
return; /* another async attempt in progress */
|
||||
}
|
||||
|
Reference in New Issue
Block a user