mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[XFRM] xfrm_policy_destroy: Rename and relative fixes.
Since __xfrm_policy_destroy is used to destory the resources allocated by xfrm_policy_alloc. So using the name __xfrm_policy_destroy is not correspond with xfrm_policy_alloc. Rename it to xfrm_policy_destroy. And along with some instances that call xfrm_policy_alloc but not using xfrm_policy_destroy to destroy the resource, fix them. Signed-off-by: WANG Cong <[email protected]> Acked-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d66e37a99d
commit
64c31b3f76
4 changed files with 7 additions and 9 deletions
|
|
@ -221,7 +221,7 @@ EXPORT_SYMBOL(xfrm_policy_alloc);
|
|||
|
||||
/* Destroy xfrm_policy: descendant resources must be released to this moment. */
|
||||
|
||||
void __xfrm_policy_destroy(struct xfrm_policy *policy)
|
||||
void xfrm_policy_destroy(struct xfrm_policy *policy)
|
||||
{
|
||||
BUG_ON(!policy->dead);
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ void __xfrm_policy_destroy(struct xfrm_policy *policy)
|
|||
security_xfrm_policy_free(policy);
|
||||
kfree(policy);
|
||||
}
|
||||
EXPORT_SYMBOL(__xfrm_policy_destroy);
|
||||
EXPORT_SYMBOL(xfrm_policy_destroy);
|
||||
|
||||
static void xfrm_policy_gc_kill(struct xfrm_policy *policy)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@ static struct xfrm_policy *xfrm_policy_construct(struct xfrm_userpolicy_info *p,
|
|||
return xp;
|
||||
error:
|
||||
*errp = err;
|
||||
kfree(xp);
|
||||
xfrm_policy_destroy(xp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue