]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()
authorSoenke Huster <soenke.huster@eknoes.de>
Wed, 20 Oct 2021 08:14:44 +0000 (10:14 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:06 +0000 (10:59 +0100)
commit50a8ad695ea4360b62ba6853cdee95359bc0f900
tree0797a04e99dd060bce86704d6ca7569b6a0f50a6
parent3b681ce02ba7f3cd398233e0b3524f01729bd3c4
Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 1d0688421449718c6c5f46e458a378c9b530ba18 ]

On the reception of packets with an invalid packet type, the memory of
the allocated socket buffers is never freed. Add a default case that frees
these to avoid a memory leak.

Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver")
Signed-off-by: Soenke Huster <soenke.huster@eknoes.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/bluetooth/virtio_bt.c