]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: btrtl: Fix memory leak in rtlbt_parse_firmware_v2()
authorAbdun Nihaal <nihaal@cse.iitm.ac.in>
Tue, 28 Oct 2025 17:56:30 +0000 (23:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:41 +0000 (15:37 -0500)
commit08e38cee9be56eed0905c1bbbc33c414c05a5ef4
tree154cff3ac39c50cdf296a5acae984c24f6ed0f87
parent1a0ddaaf97405dbd11d4cb5a961a3f82400e8a50
Bluetooth: btrtl: Fix memory leak in rtlbt_parse_firmware_v2()

[ Upstream commit 1c21cf89a66413eb04b2d22c955b7a50edc14dfa ]

The memory allocated for ptr using kvmalloc() is not freed on the last
error path. Fix that by freeing it on that error path.

Fixes: 9a24ce5e29b1 ("Bluetooth: btrtl: Firmware format v2 support")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bluetooth/btrtl.c