aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 76dcd882f87b..16b72b5570c3 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
2291 return 0; 2291 return 0;
2292 2292
2293out: 2293out:
2294 security_xfrm_policy_free(xp); 2294 xfrm_policy_destroy(xp);
2295 kfree(xp);
2296 return err; 2295 return err;
2297} 2296}
2298 2297
@@ -3236,8 +3235,7 @@ static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt,
3236 return xp; 3235 return xp;
3237 3236
3238out: 3237out:
3239 security_xfrm_policy_free(xp); 3238 xfrm_policy_destroy(xp);
3240 kfree(xp);
3241 return NULL; 3239 return NULL;
3242} 3240}
3243 3241