From bb7a9f16f85a1bab6d96b9efcee3a3ed8a971e70 Mon Sep 17 00:00:00 2001 From: Daniel Hartmeier Date: Thu, 21 Dec 2006 12:26:52 +0000 Subject: 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. --- sys/net/pf.c | 4 ++-- 1 file 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; -- cgit v1.2.3