diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-06-11 05:21:21 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-06-11 05:21:21 +0000 |
commit | e03316ce38964a9bbf441a423cfa20ae881a9846 (patch) | |
tree | 041cc4fc799db385d22c368c1d9be9cf56aabd4c /sys/net/pf_table.c | |
parent | 79dc5f08f8b126a0c99068a8ceb324823e0059cb (diff) |
Eliminate a dereference after pool_put when an inactive/no-longer referenced
table is destroyed in pfr_setflags_ktable.
Fix from Chris Pascoe
Diffstat (limited to 'sys/net/pf_table.c')
-rw-r--r-- | sys/net/pf_table.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c index 6f95eb7b92b..c61571a6bb3 100644 --- a/sys/net/pf_table.c +++ b/sys/net/pf_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_table.c,v 1.55 2004/06/07 13:16:19 cedric Exp $ */ +/* $OpenBSD: pf_table.c,v 1.56 2004/06/11 05:21:20 mcbride Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -1730,10 +1730,12 @@ pfr_insert_ktable(struct pfr_ktable *kt) void pfr_setflags_ktables(struct pfr_ktableworkq *workq) { - struct pfr_ktable *p; + struct pfr_ktable *p, *q; - SLIST_FOREACH(p, workq, pfrkt_workq) + for (p = SLIST_FIRST(workq); p; p = q) { + q = SLIST_NEXT(p, pfrkt_workq); pfr_setflags_ktable(p, p->pfrkt_nflags); + } } void |