diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-02-04 13:12:35 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-19 13:48:43 +0100 |
commit | 9473d06bd1c8da49eafb685aa95a290290c672dd (patch) | |
tree | e5aead2a7648a895b62ec93d9b275f44747f2876 | |
parent | 107e8e719e93895da5af39542f1cac73277cdabe (diff) | |
download | linux-stable-9473d06bd1c8da49eafb685aa95a290290c672dd.tar.gz linux-stable-9473d06bd1c8da49eafb685aa95a290290c672dd.tar.bz2 linux-stable-9473d06bd1c8da49eafb685aa95a290290c672dd.zip |
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>
-rw-r--r-- | net/bluetooth/hci_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 6c00ce302f09..1c8fb27b155a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3969,6 +3969,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); |