mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
Calling plug_closing() is highly likely to result in a call to sk_close(),
so arrange that mactcp_poll() can cope with that and not access freed memory when it happens. [originally from svn r2545]
This commit is contained in:
parent
cd79a89c11
commit
2506a26ab4
@ -603,11 +603,11 @@ static pascal void mactcp_asr(StreamPtr str, unsigned short event, Ptr cookie,
|
||||
*/
|
||||
void mactcp_poll(void)
|
||||
{
|
||||
Actual_Socket s;
|
||||
Actual_Socket s, next;
|
||||
TCPiopb pb;
|
||||
|
||||
for (s = mactcp.socklist; s != NULL; s = s->next) {
|
||||
/* XXX above can't handle sockets being deleted. */
|
||||
for (s = mactcp.socklist; s != NULL; s = next) {
|
||||
next = s->next;
|
||||
do {
|
||||
pb.ioCRefNum = mactcp.refnum;
|
||||
pb.csCode = TCPStatus;
|
||||
|
Loading…
Reference in New Issue
Block a user