summaryrefslogtreecommitdiff
path: root/sys/netinet6/icmp6.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-09-01 15:05:32 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-09-01 15:05:32 +0000
commit12f74acdeb1b3c509e5d628e1e838e1738ea082a (patch)
treeb1cddabdd93422bcd10172a3790c6a941ac6e4bd /sys/netinet6/icmp6.c
parentaebafd059da2974a1bcbe5ec8c474a8c881b8ca9 (diff)
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/netinet6/icmp6.c')
-rw-r--r--sys/netinet6/icmp6.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 1b7d4feacca..9602b127d07 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.215 2017/08/10 02:26:26 bluhm Exp $ */
+/* $OpenBSD: icmp6.c,v 1.216 2017/09/01 15:05:31 mpi Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -1687,11 +1687,8 @@ icmp6_ctloutput(int op, struct socket *so, int level, int optname,
int error = 0;
struct inpcb *in6p = sotoinpcb(so);
- if (level != IPPROTO_ICMPV6) {
- if (op == PRCO_SETOPT)
- (void)m_free(m);
+ if (level != IPPROTO_ICMPV6)
return EINVAL;
- }
switch (op) {
case PRCO_SETOPT:
@@ -1719,7 +1716,6 @@ icmp6_ctloutput(int op, struct socket *so, int level, int optname,
error = ENOPROTOOPT;
break;
}
- m_freem(m);
break;
case PRCO_GETOPT: