diff options
author | 2017-09-01 15:05:31 +0000 | |
---|---|---|
committer | 2017-09-01 15:05:31 +0000 | |
commit | e09b1b7c399f82ae784da0bb3508c9e74fbd7692 (patch) | |
tree | 39a99b2b3f132da588e6d96ba211e45cf2f5b1e9 /sys/netinet/tcp_usrreq.c | |
parent | Make 'tcpdump -v' decode RSN information elements in beacons (diff) | |
download | wireguard-openbsd-e09b1b7c399f82ae784da0bb3508c9e74fbd7692.tar.xz wireguard-openbsd-e09b1b7c399f82ae784da0bb3508c9e74fbd7692.zip |
Change sosetopt() to no longer free the mbuf it receives and change
all the callers to call m_freem(9).
Support from deraadt@ and tedu@, ok visa@, bluhm@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 4f7ab9fc58b..d4f92b471d4 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.153 2017/08/15 17:47:15 bluhm Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.154 2017/09/01 15:05:31 mpi Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -437,11 +437,8 @@ tcp_ctloutput(int op, struct socket *so, int level, int optname, int i; inp = sotoinpcb(so); - if (inp == NULL) { - if (op == PRCO_SETOPT) - (void) m_free(m); + if (inp == NULL) return (ECONNRESET); - } if (level != IPPROTO_TCP) { switch (so->so_proto->pr_domain->dom_family) { #ifdef INET6 @@ -547,7 +544,6 @@ tcp_ctloutput(int op, struct socket *so, int level, int optname, error = ENOPROTOOPT; break; } - m_free(m); break; case PRCO_GETOPT: |