diff options
author | David Krause <david@cvs.openbsd.org> | 2010-07-02 03:58:49 +0000 |
---|---|---|
committer | David Krause <david@cvs.openbsd.org> | 2010-07-02 03:58:49 +0000 |
commit | 8019ed2066ab47ee5b881fc753090d5fe400518e (patch) | |
tree | 6a7470bb0e3d7f84cb613a019327c33c34ecce62 /sys/netinet | |
parent | 36597fb2fdbb69da33f67b6a87f2c8a26226f303 (diff) |
don't reference an item after it has been returned to the pool
an 8 year old bug exposed by recent uvm changes
ok thib@ tedu@ deraadt@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_spd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c index 876ba82a1ae..e3fd6117317 100644 --- a/sys/netinet/ip_spd.c +++ b/sys/netinet/ip_spd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_spd.c,v 1.60 2010/01/15 18:20:23 chl Exp $ */ +/* $OpenBSD: ip_spd.c,v 1.61 2010/07/02 03:58:48 david Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -599,11 +599,11 @@ ipsec_delete_policy(struct ipsec_policy *ipo) if (ipo->ipo_local_auth) ipsp_reffree(ipo->ipo_local_auth); - pool_put(&ipsec_policy_pool, ipo); - if (!(ipo->ipo_flags & IPSP_POLICY_SOCKET)) ipsec_in_use--; + pool_put(&ipsec_policy_pool, ipo); + return err; } |