Skip to content

Commit

Permalink
xfrm: Delete hold_timer when destroy policy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fan Du authored and Steffen Klassert committed Aug 6, 2013
1 parent 8603b95 commit 0659eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0659eea

Please sign in to comment.