xfrm: Delete hold_timer when destroy policy
Both policy timer and hold_timer need to be deleted when destroy policy Signed-off-by: Fan Du <fan.du@windriver.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
8603b9556e
commit
0659eea912
|
@ -308,7 +308,7 @@ void xfrm_policy_destroy(struct xfrm_policy *policy)
|
|||
{
|
||||
BUG_ON(!policy->walk.dead);
|
||||
|
||||
if (del_timer(&policy->timer))
|
||||
if (del_timer(&policy->timer) || del_timer(&policy->polq.hold_timer))
|
||||
BUG();
|
||||
|
||||
security_xfrm_policy_free(policy->security);
|
||||
|
|
Loading…
Reference in New Issue