ipv6: sr: fix double free of skb after handling invalid SRH
authorDavid Lebrun <david.lebrun@uclouvain.be>
Wed, 19 Apr 2017 14:10:19 +0000 (16:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2017 17:16:01 +0000 (13:16 -0400)
The icmpv6_param_prob() function already does a kfree_skb(),
this patch removes the duplicate one.

Fixes: 1ababeba4a21f3dba3da3523c670b207fb2feb62 ("ipv6: implement dataplane support for rthdr type 4 (Segment Routing Header)")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/exthdrs.c

index 275cac628a95066f0a27e93f5015ddeb0172c28c..25192a3b0cd7ec2a100fd4c5c20d52f8333984e8 100644 (file)
@@ -388,7 +388,6 @@ looped_back:
                icmpv6_param_prob(skb, ICMPV6_HDR_FIELD,
                                  ((&hdr->segments_left) -
                                   skb_network_header(skb)));
-               kfree_skb(skb);
                return -1;
        }