aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm')
-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 b822b56e5b8e..1810f5645bb5 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1343,14 +1343,14 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh,
1343 if (err) 1343 if (err)
1344 return err; 1344 return err;
1345 1345
1346 ctx = NULL;
1346 if (rt) { 1347 if (rt) {
1347 struct xfrm_user_sec_ctx *uctx = nla_data(rt); 1348 struct xfrm_user_sec_ctx *uctx = nla_data(rt);
1348 1349
1349 err = security_xfrm_policy_alloc(&ctx, uctx); 1350 err = security_xfrm_policy_alloc(&ctx, uctx);
1350 if (err) 1351 if (err)
1351 return err; 1352 return err;
1352 } else 1353 }
1353 ctx = NULL;
1354 xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, ctx, 1354 xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, ctx,
1355 delete, &err); 1355 delete, &err);
1356 security_xfrm_policy_free(ctx); 1356 security_xfrm_policy_free(ctx);
@@ -1579,14 +1579,14 @@ static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
1579 if (err) 1579 if (err)
1580 return err; 1580 return err;
1581 1581
1582 ctx = NULL;
1582 if (rt) { 1583 if (rt) {
1583 struct xfrm_user_sec_ctx *uctx = nla_data(rt); 1584 struct xfrm_user_sec_ctx *uctx = nla_data(rt);
1584 1585
1585 err = security_xfrm_policy_alloc(&ctx, uctx); 1586 err = security_xfrm_policy_alloc(&ctx, uctx);
1586 if (err) 1587 if (err)
1587 return err; 1588 return err;
1588 } else 1589 }
1589 ctx = NULL;
1590 xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, ctx, 0, &err); 1590 xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, ctx, 0, &err);
1591 security_xfrm_policy_free(ctx); 1591 security_xfrm_policy_free(ctx);
1592 } 1592 }