diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 83c8135e1764..fda737d77edc 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
| @@ -765,8 +765,8 @@ restart: | |||
| 765 | switch (policy->action) { | 765 | switch (policy->action) { |
| 766 | case XFRM_POLICY_BLOCK: | 766 | case XFRM_POLICY_BLOCK: |
| 767 | /* Prohibit the flow */ | 767 | /* Prohibit the flow */ |
| 768 | xfrm_pol_put(policy); | 768 | err = -EPERM; |
| 769 | return -EPERM; | 769 | goto error; |
| 770 | 770 | ||
| 771 | case XFRM_POLICY_ALLOW: | 771 | case XFRM_POLICY_ALLOW: |
| 772 | if (policy->xfrm_nr == 0) { | 772 | if (policy->xfrm_nr == 0) { |
| @@ -782,8 +782,8 @@ restart: | |||
| 782 | */ | 782 | */ |
| 783 | dst = xfrm_find_bundle(fl, policy, family); | 783 | dst = xfrm_find_bundle(fl, policy, family); |
| 784 | if (IS_ERR(dst)) { | 784 | if (IS_ERR(dst)) { |
| 785 | xfrm_pol_put(policy); | 785 | err = PTR_ERR(dst); |
| 786 | return PTR_ERR(dst); | 786 | goto error; |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | if (dst) | 789 | if (dst) |
