mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 18:11:39 +00:00
Bluetooth: hci_qca: Fix memleak in qca_controller_memdump
[ Upstream commit71f8e70755
] When __le32_to_cpu() fails, qca_memdump should be freed just like when vmalloc() fails. Fixes:d841502c79
("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ec621e8442
commit
601899cec0
1 changed files with 2 additions and 0 deletions
|
@ -1020,7 +1020,9 @@ static void qca_controller_memdump(struct work_struct *work)
|
|||
dump_size = __le32_to_cpu(dump->dump_size);
|
||||
if (!(dump_size)) {
|
||||
bt_dev_err(hu->hdev, "Rx invalid memdump size");
|
||||
kfree(qca_memdump);
|
||||
kfree_skb(skb);
|
||||
qca->qca_memdump = NULL;
|
||||
mutex_unlock(&qca->hci_memdump_lock);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue