Skip to content

Commit

Permalink
bluetooth:6lowpan: use consume_skb when packet processed successfully
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Townsend <[email protected]>
Acked-by: Alexander Aring <[email protected]>
Acked-by: Jukka Rissanen <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
  • Loading branch information
martintownsend authored and holtmann committed Oct 27, 2014
1 parent 04dfd73 commit 3c400b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/bluetooth/6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev,
dev->stats.rx_bytes += skb->len;
dev->stats.rx_packets++;

kfree_skb(local_skb);
kfree_skb(skb);
consume_skb(local_skb);
consume_skb(skb);
} else {
switch (skb->data[0] & 0xe0) {
case LOWPAN_DISPATCH_IPHC: /* ipv6 datagram */
Expand All @@ -363,7 +363,8 @@ static int recv_pkt(struct sk_buff *skb, struct net_device *dev,
dev->stats.rx_bytes += skb->len;
dev->stats.rx_packets++;

kfree_skb(skb);
consume_skb(local_skb);
consume_skb(skb);
break;
default:
break;
Expand Down

0 comments on commit 3c400b8

Please sign in to comment.