Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122700
b: refs/heads/master
c: d8eb930
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Dec 15, 2008
1 parent 430c036 commit 472bfc7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8da73b73ef29d537ba09f29393cd68707833e746
refs/heads/master: d8eb93078cedbbf4b7e18e1d7054171c7b70b442
22 changes: 12 additions & 10 deletions trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -1688,21 +1688,16 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,
int err = -ENOMEM;

if (!x)
return err;
goto nomem;

err = verify_newpolicy_info(&ua->policy);
if (err) {
printk("BAD policy passed\n");
kfree(x);
return err;
}
if (err)
goto bad_policy;

/* build an XP */
xp = xfrm_policy_construct(net, &ua->policy, attrs, &err);
if (!xp) {
kfree(x);
return err;
}
if (!xp)
goto free_state;

memcpy(&x->id, &ua->id, sizeof(ua->id));
memcpy(&x->props.saddr, &ua->saddr, sizeof(ua->saddr));
Expand All @@ -1727,6 +1722,13 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,
kfree(xp);

return 0;

bad_policy:
printk("BAD policy passed\n");
free_state:
kfree(x);
nomem:
return err;
}

#ifdef CONFIG_XFRM_MIGRATE
Expand Down

0 comments on commit 472bfc7

Please sign in to comment.