[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>
This commit is contained in:
Patrick McHardy
2005-09-08 15:11:55 -07:00
committed by David S. Miller
parent cf0b450cd5
commit e104411b82
9 changed files with 18 additions and 48 deletions

View File

@@ -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)