]> Gentwo Git Trees - linux/.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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 31 Oct 2025 16:42:47 +0000 (12:42 -0400)
commit1c21cf89a66413eb04b2d22c955b7a50edc14dfa
tree0ec9e46267841c1c41252b1183d1867b2c04d695
parent5c5f1f64681cc889d9b13e4a61285e9e029d6ab5
Bluetooth: btrtl: Fix memory leak in rtlbt_parse_firmware_v2()

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>
drivers/bluetooth/btrtl.c