summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-03-28 20:33:51 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-03-28 20:33:51 +0000
commite679a7eb1f598263240196055e2e63b0db45e73c (patch)
tree23676711d2f66e37145aaced3be0fde888c1029c /usr.bin/ssh
parent199e03c5c917c7454f374ed6a55b87f05b47991e (diff)
missing close
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/channels.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 8fc85fa8171..7f684f64b00 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -16,7 +16,7 @@
*/
#include "includes.h"
-RCSID("$Id: channels.c,v 1.41 2000/03/28 20:31:25 markus Exp $");
+RCSID("$Id: channels.c,v 1.42 2000/03/28 20:33:50 markus Exp $");
#include "ssh.h"
#include "packet.h"
@@ -237,8 +237,10 @@ channel_free(int id)
if (c == NULL)
packet_disconnect("channel free: bad local channel %d", id);
debug("channel_free: channel %d: status: %s", id, channel_open_message());
- if (compat13)
+ if (c->sock =! -1) {
shutdown(c->sock, SHUT_RDWR);
+ close(c->sock);
+ }
buffer_free(&c->input);
buffer_free(&c->output);
buffer_free(&c->extended);
@@ -658,7 +660,8 @@ channel_handler(chan_fn *ftab[], fd_set * readset, fd_set * writeset)
if (ftab[c->type] == NULL)
continue;
(*ftab[c->type])(c, readset, writeset);
- chan_delete_if_full_closed(c);
+ if (!compat13)
+ chan_delete_if_full_closed(c);
}
}