diff options
author | Patrick McHardy <kaber@trash.net> | 2005-09-08 15:11:55 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-08 15:11:55 -0700 |
commit | e104411b82f5c4d19752c335492036abdbf5880d (patch) | |
tree | 03f26f98685689ab6bfa47d5bdbb6730f64bfadb /net/xfrm | |
parent | cf0b450cd5176b68ac7d5bbe68aeae6bb6a5a4b8 (diff) | |
download | op-kernel-dev-e104411b82f5c4d19752c335492036abdbf5880d.zip op-kernel-dev-e104411b82f5c4d19752c335492036abdbf5880d.tar.gz |
[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')
-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 83c8135..fda737d 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -765,8 +765,8 @@ restart: switch (policy->action) { case XFRM_POLICY_BLOCK: /* Prohibit the flow */ - xfrm_pol_put(policy); - return -EPERM; + err = -EPERM; + goto error; case XFRM_POLICY_ALLOW: if (policy->xfrm_nr == 0) { @@ -782,8 +782,8 @@ restart: */ dst = xfrm_find_bundle(fl, policy, family); if (IS_ERR(dst)) { - xfrm_pol_put(policy); - return PTR_ERR(dst); + err = PTR_ERR(dst); + goto error; } if (dst) |