diff options
author | Florian Westphal <fw@strlen.de> | 2014-09-09 19:08:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-09 23:10:45 -0400 |
commit | 46cfd725c377bc5bb32b56b5151d6de4cb5a71e3 (patch) | |
tree | a8a8ef5d06bd634005c38bc6ed34318ed9ad29b8 | |
parent | 72bb17b37b9076e12b388feee4a52e85ef8f6620 (diff) |
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.c | 6 | ||||
-rw-r--r-- | net/xfrm/xfrm_output.c | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index b7a3e7b3378e..2e6a0dbf7fb3 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 *)) | |||
701 | return 0; | 701 | return 0; |
702 | } | 702 | } |
703 | 703 | ||
704 | while (frag) { | 704 | kfree_skb_list(frag); |
705 | skb = frag->next; | ||
706 | kfree_skb(frag); | ||
707 | frag = skb; | ||
708 | } | ||
709 | 705 | ||
710 | IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), | 706 | IP6_INC_STATS(net, ip6_dst_idev(&rt->dst), |
711 | IPSTATS_MIB_FRAGFAILS); | 707 | IPSTATS_MIB_FRAGFAILS); |
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index c51e8f7b8653..499d6c18a8ce 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) | |||
166 | err = xfrm_output2(segs); | 166 | err = xfrm_output2(segs); |
167 | 167 | ||
168 | if (unlikely(err)) { | 168 | if (unlikely(err)) { |
169 | while ((segs = nskb)) { | 169 | kfree_skb_list(nskb); |
170 | nskb = segs->next; | ||
171 | segs->next = NULL; | ||
172 | kfree_skb(segs); | ||
173 | } | ||
174 | return err; | 170 | return err; |
175 | } | 171 | } |
176 | 172 | ||