]> err.no Git - linux-2.6/blobdiff - net/xfrm/xfrm_policy.c
[PATCH] Remove security_inode_post_create/mkdir/symlink/mknod hooks
[linux-2.6] / net / xfrm / xfrm_policy.c
index 83c8135e17641dd19bd5fdb204dff3096bdd2eeb..fda737d77edcb6c274efdd3433ff6af9e1134d1e 100644 (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)