Skip to content

Commit

Permalink
net: use kfree_skb_list() helper in more places
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Sep 10, 2014
1 parent 72bb17b commit 46cfd72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,11 +701,7 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
return 0;
}

while (frag) {
skb = frag->next;
kfree_skb(frag);
frag = skb;
}
kfree_skb_list(frag);

IP6_INC_STATS(net, ip6_dst_idev(&rt->dst),
IPSTATS_MIB_FRAGFAILS);
Expand Down
6 changes: 1 addition & 5 deletions net/xfrm/xfrm_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ static int xfrm_output_gso(struct sk_buff *skb)
err = xfrm_output2(segs);

if (unlikely(err)) {
while ((segs = nskb)) {
nskb = segs->next;
segs->next = NULL;
kfree_skb(segs);
}
kfree_skb_list(nskb);
return err;
}

Expand Down

0 comments on commit 46cfd72

Please sign in to comment.