mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[XFRM]: Always release dst_entry on error in xfrm_lookup
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cf0b450cd5
commit
e104411b82
9 changed files with 18 additions and 48 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue