Bluetooth: hci_core: Fix leaking sent_cmd skb
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 4 Feb 2022 21:12:35 +0000 (13:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Mar 2022 12:47:48 +0000 (13:47 +0100)
commit3679ccc09d8806686d579095ed504e045af7f7d6
tree3eef667ece77deeaff1eb555ff193c8c3708da92
parentc2924e9143c289590eeabbd31b99a7730e8cfd8a
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>
net/bluetooth/hci_core.c