=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/telnet/commands.c,v retrieving revision 1.48 retrieving revision 1.49 diff -c -r1.48 -r1.49 *** src/usr.bin/telnet/commands.c 2005/02/27 15:46:42 1.48 --- src/usr.bin/telnet/commands.c 2006/01/14 21:21:46 1.49 *************** *** 1,4 **** ! /* $OpenBSD: commands.c,v 1.48 2005/02/27 15:46:42 otto Exp $ */ /* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: commands.c,v 1.49 2006/01/14 21:21:46 otto Exp $ */ /* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ /* *************** *** 2408,2418 **** --- 2408,2420 ---- if (error) { warn("%s: %s", aliasp, gai_strerror(error)); close(net); + net = -1; continue; } if (bind(net, ares->ai_addr, ares->ai_addrlen) < 0) { perror(aliasp); (void) close(net); /* dump descriptor */ + net = -1; freeaddrinfo(ares); continue; }