summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-09-10 01:08:46 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-09 20:10:45 -0700
commit46cfd725c377bc5bb32b56b5151d6de4cb5a71e3 (patch)
treea8a8ef5d06bd634005c38bc6ed34318ed9ad29b8
parent72bb17b37b9076e12b388feee4a52e85ef8f6620 (diff)
downloadop-kernel-dev-46cfd725c377bc5bb32b56b5151d6de4cb5a71e3.zip
op-kernel-dev-46cfd725c377bc5bb32b56b5151d6de4cb5a71e3.tar.gz
net: use kfree_skb_list() helper in more places
Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/ip6_output.c6
-rw-r--r--net/xfrm/xfrm_output.c6
2 files changed, 2 insertions, 10 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index b7a3e7b..2e6a0db 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -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);
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index c51e8f7b..499d6c1 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -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;
}
OpenPOWER on IntegriCloud