summaryrefslogtreecommitdiff
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2012-09-28 16:06:21 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2012-09-28 16:06:21 +0000
commitd6bdc48e894887b55905bd05c8e44f5716d8d508 (patch)
treef81b16aa51c8e1ab722ea08c3d73f6027def3227 /sys/netinet/udp_usrreq.c
parent5b825e908b8fb13b14d96ee7ec09fcde99898e9b (diff)
free the control message in udp_input() if the packet is passed to pipex
ok yasuoka@
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 48700af5473..82f0eef86c9 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.150 2012/09/17 20:01:26 yasuoka Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.151 2012/09/28 16:06:20 markus Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -722,8 +722,11 @@ udp_input(struct mbuf *m, ...)
int off = iphlen + sizeof(struct udphdr);
if ((session = pipex_l2tp_lookup_session(m, off)) != NULL) {
if ((m = pipex_l2tp_input(m, off, session,
- ipsecflowinfo)) == NULL)
+ ipsecflowinfo)) == NULL) {
+ if (opts)
+ m_freem(opts);
return; /* the packet is handled by PIPEX */
+ }
}
}
#endif