aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index c4f6419b1769..e0ccdf267813 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1043,7 +1043,7 @@ static struct xfrm_policy *xfrm_policy_construct(struct xfrm_userpolicy_info *p,
1043 return xp; 1043 return xp;
1044 error: 1044 error:
1045 *errp = err; 1045 *errp = err;
1046 kfree(xp); 1046 xfrm_policy_destroy(xp);
1047 return NULL; 1047 return NULL;
1048} 1048}
1049 1049
@@ -1986,8 +1986,8 @@ static inline size_t xfrm_sa_len(struct xfrm_state *x)
1986 if (x->coaddr) 1986 if (x->coaddr)
1987 l += nla_total_size(sizeof(*x->coaddr)); 1987 l += nla_total_size(sizeof(*x->coaddr));
1988 1988
1989 /* Must count this as this may become non-zero behind our back. */ 1989 /* Must count x->lastused as it may become non-zero behind our back. */
1990 l += nla_total_size(sizeof(x->lastused)); 1990 l += nla_total_size(sizeof(u64));
1991 1991
1992 return l; 1992 return l;
1993} 1993}
@@ -2420,7 +2420,7 @@ static void __exit xfrm_user_exit(void)
2420 xfrm_unregister_km(&netlink_mgr); 2420 xfrm_unregister_km(&netlink_mgr);
2421 rcu_assign_pointer(xfrm_nl, NULL); 2421 rcu_assign_pointer(xfrm_nl, NULL);
2422 synchronize_rcu(); 2422 synchronize_rcu();
2423 sock_release(nlsk->sk_socket); 2423 netlink_kernel_release(nlsk);
2424} 2424}
2425 2425
2426module_init(xfrm_user_init); 2426module_init(xfrm_user_init);