summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-02-05 00:12:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-19 15:47:48 +0300
commit3679ccc09d8806686d579095ed504e045af7f7d6 (patch)
tree3eef667ece77deeaff1eb555ff193c8c3708da92 /net/bluetooth
parentc2924e9143c289590eeabbd31b99a7730e8cfd8a (diff)
downloadlinux-3679ccc09d8806686d579095ed504e045af7f7d6.tar.xz
Bluetooth: hci_core: Fix leaking sent_cmd skb
[ Upstream commit dd3b1dc3dd050f1f47cd13e300732852414270f8 ] sent_cmd memory is not freed before freeing hci_dev causing it to leak it contents. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 53f1b08017aa..c67390367cc2 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -4083,6 +4083,7 @@ void hci_release_dev(struct hci_dev *hdev)
hci_dev_unlock(hdev);
ida_simple_remove(&hci_index_ida, hdev->id);
+ kfree_skb(hdev->sent_cmd);
kfree(hdev);
}
EXPORT_SYMBOL(hci_release_dev);