so arrange that mactcp_poll() can cope with that and not access freed memory
when it happens.
git-svn-id: svn://svn.tartarus.org/sgt/putty@2545
cda61777-01e9-0310-a592-
d414129be87e
*/
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;