6LoWPAN: double free in lowpan_fragment_xmit()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Nov 2011 22:36:43 +0000 (22:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2011 23:13:38 +0000 (18:13 -0500)
dev_queue_xmit() consumes its own skb, so the call to dev_kfree_skb()
in lowpan_fragment_xmit() is a double free.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/6lowpan.c

index 602f318a8d62f54ae9a1104fff164d01b26ab94f..e4ecc1eef98c3b2aca2b583de283bc7bc7b2f44c 100644 (file)
@@ -980,9 +980,6 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,
 
        ret = dev_queue_xmit(frag);
 
-       if (ret < 0)
-               dev_kfree_skb(frag);
-
        return ret;
 }