diff options
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 5b1e5af25713..c5fbd7589681 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -2366,6 +2366,8 @@ static int pfkey_spddelete(struct sock *sk, struct sk_buff *skb, const struct sa | |||
2366 | 2366 | ||
2367 | out: | 2367 | out: |
2368 | xfrm_pol_put(xp); | 2368 | xfrm_pol_put(xp); |
2369 | if (err == 0) | ||
2370 | xfrm_garbage_collect(net); | ||
2369 | return err; | 2371 | return err; |
2370 | } | 2372 | } |
2371 | 2373 | ||
@@ -2615,6 +2617,8 @@ static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, const struct sadb_ | |||
2615 | 2617 | ||
2616 | out: | 2618 | out: |
2617 | xfrm_pol_put(xp); | 2619 | xfrm_pol_put(xp); |
2620 | if (delete && err == 0) | ||
2621 | xfrm_garbage_collect(net); | ||
2618 | return err; | 2622 | return err; |
2619 | } | 2623 | } |
2620 | 2624 | ||