summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2006-12-21 12:26:52 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2006-12-21 12:26:52 +0000
commitbb7a9f16f85a1bab6d96b9efcee3a3ed8a971e70 (patch)
tree9c7092e01173dd98f5debc4502a830fa1a51d5d9 /sys/net/pf.c
parent9f0e7cbe495acd1e19c161538aabfdeb3efd05f8 (diff)
in pf_route(), initialize ro to NULL at the beginning. if left un-
initialized, it might equal &iproute by chance, causing a panic when rtfree() is then mistakenly called.
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 0753925fe71..357f9e785df 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.521 2006/12/14 20:40:54 dhartmei Exp $ */
+/* $OpenBSD: pf.c,v 1.522 2006/12/21 12:26:51 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5475,7 +5475,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
{
struct mbuf *m0, *m1;
struct route iproute;
- struct route *ro;
+ struct route *ro = NULL;
struct sockaddr_in *dst;
struct ip *ip;
struct ifnet *ifp = NULL;