[PATCH 3.13.y-ckt 043/132] Bluetooth: btusb: Fix memory leak in Intel setup routine

Kamal Mostafa kamal at canonical.com
Thu Jul 23 01:59:21 UTC 2015


3.13.11-ckt24 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Marcel Holtmann <marcel at holtmann.org>

commit ecffc80478cdce122f0ecb6a4e4f909132dd5c47 upstream.

The SKB returned from the Intel specific version information command is
missing a kfree_skb.

Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg at intel.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/bluetooth/btusb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 43a885b..3b9e049 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1252,6 +1252,8 @@ static int btusb_setup_intel(struct hci_dev *hdev)
 	}
 	fw_ptr = fw->data;
 
+	kfree_skb(skb);
+
 	/* This Intel specific command enables the manufacturer mode of the
 	 * controller.
 	 *
-- 
1.9.1





More information about the kernel-team mailing list