Index: pr3287/telnet.c =================================================================== --- pr3287/telnet.c.orig +++ pr3287/telnet.c @@ -434,6 +434,10 @@ pr_net_negotiate(const char *host, struc cstate != NOT_CONNECTED) { /* gave up */ if (!net_input(s)) { + Free(netrbuf); + Free(ibuf); + netrbuf = NULL; + ibuf = NULL; return false; } }