summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/icmp6.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2015-09-11 19:42:45 +0000
committerdlg <dlg@openbsd.org>2015-09-11 19:42:45 +0000
commita7cdd8e89c6ae53fca5173759af9807d8a57ebe8 (patch)
treee2d94e321a3f159171a680cadd1dfdca255e94d7 /sys/netinet6/icmp6.c
parentRemove never called functions to dump per-ifp IPv6 statistics now that (diff)
downloadwireguard-openbsd-a7cdd8e89c6ae53fca5173759af9807d8a57ebe8.tar.xz
wireguard-openbsd-a7cdd8e89c6ae53fca5173759af9807d8a57ebe8.zip
if_put after if_get when IP6_EXTHDR_GET fails in icmp6_input.
claudio missed this one cos he was drunk while he was supposed to be fixing this file. ok claudio@ mpi@
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r--sys/netinet6/icmp6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index ea170130fed..a99e0596849 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.169 2015/09/11 15:12:29 bluhm Exp $ */
+/* $OpenBSD: icmp6.c,v 1.170 2015/09/11 19:42:45 dlg Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -405,6 +405,7 @@ icmp6_input(struct mbuf **mp, int *offp, int proto)
IP6_EXTHDR_GET(icmp6, struct icmp6_hdr *, m, off, sizeof(*icmp6));
if (icmp6 == NULL) {
icmp6stat.icp6s_tooshort++;
+ if_put(ifp);
return IPPROTO_DONE;
}
code = icmp6->icmp6_code;