summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2017-05-31 08:58:52 +0000
committerderaadt <deraadt@openbsd.org>2017-05-31 08:58:52 +0000
commita64355c7334c59be0e3cc85bf489b8cacada688b (patch)
treee3a0de70f054f377bb4deb821c1981b77ea2eca4
parentvirtio_pci: Support IPL_MPSAFE interrupt handlers (diff)
downloadwireguard-openbsd-a64355c7334c59be0e3cc85bf489b8cacada688b.tar.xz
wireguard-openbsd-a64355c7334c59be0e3cc85bf489b8cacada688b.zip
These shutdown() SHUT_RDWR are not needed before close()
ok djm markus claudio
-rw-r--r--usr.bin/ssh/channels.c4
-rw-r--r--usr.bin/ssh/packet.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 1938e515e82..6490c8b650b 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.364 2017/05/31 00:43:04 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.365 2017/05/31 08:58:52 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -469,8 +469,6 @@ channel_free(Channel *c)
debug3("channel %d: status: %s", c->self, s);
free(s);
- if (c->sock != -1)
- shutdown(c->sock, SHUT_RDWR);
channel_close_fds(c);
buffer_free(&c->input);
buffer_free(&c->output);
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 08ab9d4759d..b13ba77f2d7 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.257 2017/05/31 08:09:45 markus Exp $ */
+/* $OpenBSD: packet.c,v 1.258 2017/05/31 08:58:52 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -559,7 +559,6 @@ ssh_packet_close_internal(struct ssh *ssh, int do_close)
state->initialized = 0;
if (do_close) {
if (state->connection_in == state->connection_out) {
- shutdown(state->connection_out, SHUT_RDWR);
close(state->connection_out);
} else {
close(state->connection_in);