summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-02-04 13:12:35 -0800
committerMarcel Holtmann <marcel@holtmann.org>2022-02-24 21:05:21 +0100
commitdd3b1dc3dd050f1f47cd13e300732852414270f8 (patch)
tree9bbed950509ef2e16b2a1231a0d5d73dabe162f6 /net/bluetooth/hci_core.c
parent42404d8f1c01861b22ccfa1d70f950242720ae57 (diff)
downloadlinux-dd3b1dc3dd050f1f47cd13e300732852414270f8.tar.gz
linux-dd3b1dc3dd050f1f47cd13e300732852414270f8.tar.bz2
linux-dd3b1dc3dd050f1f47cd13e300732852414270f8.zip
Bluetooth: hci_core: Fix leaking sent_cmd skb
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>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-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 2b7bd3655b07..2882bc7d79d7 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2738,6 +2738,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);