avoid duplicate free.
(though KAME doesn't decide how to fix it yet, I once commit it to be in time for 5.2.1-RELEASE.) Submitted by: itojun
This commit is contained in:
parent
ac43768e06
commit
87f15e2106
@ -1958,7 +1958,6 @@ key_spdadd(so, m, mhp)
|
||||
newsp->lifetime = lft ? lft->sadb_lifetime_addtime : 0;
|
||||
newsp->validtime = lft ? lft->sadb_lifetime_usetime : 0;
|
||||
|
||||
newsp->refcnt = 1; /* do not reclaim until I say I do */
|
||||
newsp->state = IPSEC_SPSTATE_ALIVE;
|
||||
LIST_INSERT_TAIL(&sptree[newsp->dir], newsp, secpolicy, chain);
|
||||
|
||||
@ -7591,9 +7590,10 @@ key_sp_unlink(sp)
|
||||
{
|
||||
|
||||
/* remove from SP index */
|
||||
if (__LIST_CHAINED(sp))
|
||||
if (__LIST_CHAINED(sp)) {
|
||||
LIST_REMOVE(sp, chain);
|
||||
key_freesp(sp);
|
||||
key_freesp(sp);
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX too much? */
|
||||
|
Loading…
Reference in New Issue
Block a user