]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bluetooth:6lowpan: use consume_skb when packet processed successfully
authorMartin Townsend <mtownsend1973@gmail.com>
Thu, 23 Oct 2014 14:40:55 +0000 (15:40 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 27 Oct 2014 14:51:16 +0000 (15:51 +0100)
Signed-off-by: Martin Townsend <mtownsend1973@gmail.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/6lowpan.c

index 94bbb6611bc5b4095126efc30cb32ad3dc993c16..40e2cec7fcefd2b463e7d434746febf9934b8c91 100644 (file)
@@ -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 */
@@ -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;