diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2009-11-23 18:41:22 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2009-11-23 18:41:22 +0000 |
commit | 973a104bec43c4e8cc07016fff01e8191a91d628 (patch) | |
tree | 911c680a03adb71f6acc6612813924fc000a64a9 /sys/net/pf.c | |
parent | 392833aa1ed488528584443956d6029cecda1706 (diff) |
with the old code we initialized the state keys early in some cases
and thus had to get rid of them if we didn't create state. this is no
longer the case, kill dead code. ok claudio
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 1e95dee747c..1cba827dedf 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.675 2009/11/23 18:10:43 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.676 2009/11/23 18:41:21 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2663,7 +2663,7 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, struct pf_rule_slist rules; struct pf_rule_item *ri; struct tcphdr *th = pd->hdr.tcp; - struct pf_state_key *skw = NULL, *sks = NULL; + struct pf_state_key *skw, *sks; struct pf_rule_actions act; u_short reason; int rewrite = 0, hdrlen = 0; @@ -2942,10 +2942,6 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, rewrite = 1; } } else { - if (sks != NULL) - pool_put(&pf_state_key_pl, sks); - if (skw != NULL) - pool_put(&pf_state_key_pl, skw); while ((ri = SLIST_FIRST(&rules))) { SLIST_REMOVE_HEAD(&rules, entry); pool_put(&pf_rule_item_pl, ri); @@ -2973,10 +2969,6 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, return (PF_PASS); cleanup: - if (sks != NULL) - pool_put(&pf_state_key_pl, sks); - if (skw != NULL) - pool_put(&pf_state_key_pl, skw); while ((ri = SLIST_FIRST(&rules))) { SLIST_REMOVE_HEAD(&rules, entry); pool_put(&pf_rule_item_pl, ri); |