aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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