Skip to content

Commit

Permalink
6LoWPAN: double free in lowpan_fragment_xmit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Nov 16, 2011
1 parent daad616 commit d445ba6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/ieee802154/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d445ba6

Please sign in to comment.