Skip to contentSkip to conversation

bluetooth/hci_ath: kfree() => kfree_skb()

PATCH In review Dan Carpenter 3 participants 3 messages Jul 23, 2010 – Jul 27, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth/hci_ath: kfree() => kfree_skb()

sk_buffs have to be freed with kfree_skb() instead of kfree().

drivers/bluetooth/hci_ath.c +1 -1
index 5ab258b..74a8f61 100755
@@ -163,7 +163,7 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	struct ath_struct *ath = hu->priv;
 
 	if (bt_cb(skb)->pkt_type = HCI_SCODATA_PKT) {
-		kfree(skb);
+		kfree_skb(skb);
 		return 0;
 	}
 
Acked-by on v1 1/1
#1 lore raw

Hi Dan,

Quoted 9 lines · Dan Carpenter

sk_buffs have to be freed with kfree_skb() instead of kfree().

drivers/bluetooth/hci_ath.c +0 -0
index 5ab258b..74a8f61 100755

drivers/bluetooth/hci_ath.c static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) · line 168

Quoted 7 lines
drivers/bluetooth/hci_ath.c +1 -1
@@ -163,7 +163,7 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	struct ath_struct *ath = hu->priv;
 
 	if (bt_cb(skb)->pkt_type = HCI_SCODATA_PKT) {
-		kfree(skb);
+		kfree_skb(skb);
 		return 0;
 	}
Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
maintainer
#2 lore raw

Hi Dan,

Quoted 11 lines
Quoted 11 lines

sk_buffs have to be freed with kfree_skb() instead of kfree().

drivers/bluetooth/hci_ath.c +0 -0
index 5ab258b..74a8f61 100755
@@ -163,7 +163,7 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	struct ath_struct *ath = hu->priv;
 
Quoted 7 lines

drivers/bluetooth/hci_ath.c static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) · line 168

Quoted 5 lines
drivers/bluetooth/hci_ath.c +1 -1
 	if (bt_cb(skb)->pkt_type = HCI_SCODATA_PKT) {
-		kfree(skb);
+		kfree_skb(skb);
 		return 0;
 	}

patch has been applied. Thanks.

Regards

Marcel