summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-02-10 20:20:02 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2004-02-10 20:20:02 +0000
commitacc96c29c62035d38bea930d9f6669be56064bdd (patch)
treec0e770f443b9b17cb622102ac6468aa461c5d362 /sys/net/pf.c
parent059f45599ccaca843e9879cc92e16655bec5ff62 (diff)
plug mbuf leak (ip_fragment() always free mbuf on error). tested by cedric,
dhartmei ok
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 4d2ab09b455..2ff09f04c04 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.422 2004/02/10 18:49:10 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.423 2004/02/10 20:20:01 itojun Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5006,8 +5006,10 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
m1 = m0;
error = ip_fragment(m0, ifp, ifp->if_mtu);
- if (error)
+ if (error) {
+ m0 = NULL;
goto bad;
+ }
for (m0 = m1; m0; m0 = m1) {
m1 = m0->m_nextpkt;