Bluetooth: 6lowpan: Memory leak as the skb is not freed
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 1 Oct 2014 08:30:26 +0000 (11:30 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 2 Oct 2014 10:41:30 +0000 (13:41 +0300)
The earlier multicast commit 36b3dd250dde ("Bluetooth: 6lowpan:
Ensure header compression does not corrupt IPv6 header") lost one
skb free which then caused memory leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/6lowpan.c

index f0432aea8dadfacd201e45a22a5742792bc82954..add2b58312d7e784b489d5b4dd09a43c2e43db18 100644 (file)
@@ -625,6 +625,8 @@ static netdev_tx_t bt_xmit(struct sk_buff *skb, struct net_device *netdev)
                send_mcast_pkt(skb, netdev);
        }
 
+       dev_kfree_skb(skb);
+
        if (err)
                BT_DBG("ERROR: xmit failed (%d)", err);