projects
/
u
/
mdw
/
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
[u/mdw/putty]
/
raw.c
diff --git
a/raw.c
b/raw.c
index
2abc0a8
..
9cbb606
100644
(file)
--- a/
raw.c
+++ b/
raw.c
@@
-24,13
+24,15
@@
static void c_write (char *buf, int len) {
from_backend(0, buf, len);
}
from_backend(0, buf, len);
}
-static int raw_receive (Socket s, int urgent, char *data, int len) {
+static int raw_receive (Socket s
kt
, int urgent, char *data, int len) {
if (urgent==3) {
/* A socket error has occurred. */
if (urgent==3) {
/* A socket error has occurred. */
+ sk_close(s);
+ s = NULL;
connection_fatal(data);
len = 0;
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;