~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent duplicate sk_close() calls on the same socket when the
[sgt/putty]
/
telnet.c
diff --git
a/telnet.c
b/telnet.c
index
cd70d9b
..
8cb02a0
100644
(file)
--- a/
telnet.c
+++ b/
telnet.c
@@
-468,11
+468,11
@@
static void do_telnet_read (char *buf, int len) {
static int telnet_receive(Socket skt, int urgent, char *data, int len) {
if (urgent==3) {
/* A socket error has occurred. */
static int telnet_receive(Socket skt, int urgent, char *data, int len) {
if (urgent==3) {
/* A socket error has occurred. */
+ sk_close(s);
s = NULL;
connection_fatal(data);
s = NULL;
connection_fatal(data);
- len = 0;
- }
- if (!len) {
+ return 0;
+ } else if (!len) {
/* Connection has closed. */
sk_close(s);
s = NULL;
/* Connection has closed. */
sk_close(s);
s = NULL;