From 64c31b3f76482bb64459e786f9eca3bd0164d153 Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Mon, 7 Jan 2008 22:34:29 -0800 Subject: [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 Acked-by: Herbert Xu Signed-off-by: David S. Miller --- net/key/af_key.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'net/key') diff --git a/net/key/af_key.c b/net/key/af_key.c index 76dcd882f87..16b72b5570c 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -2291,8 +2291,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h return 0; out: - security_xfrm_policy_free(xp); - kfree(xp); + xfrm_policy_destroy(xp); return err; } @@ -3236,8 +3235,7 @@ static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt, return xp; out: - security_xfrm_policy_free(xp); - kfree(xp); + xfrm_policy_destroy(xp); return NULL; } -- cgit v1.2.3