aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-09-08 18:11:55 -0400
committerDavid S. Miller <davem@davemloft.net>2005-09-08 18:11:55 -0400
commite104411b82f5c4d19752c335492036abdbf5880d (patch)
tree03f26f98685689ab6bfa47d5bdbb6730f64bfadb /net/xfrm/xfrm_policy.c
parentcf0b450cd5176b68ac7d5bbe68aeae6bb6a5a4b8 (diff)
[XFRM]: Always release dst_entry on error in xfrm_lookup
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c8
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)