]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: thrustmaster: fix memory leak in thrustmaster_interrupts()
authorQasim Ijaz <qasdev00@gmail.com>
Thu, 27 Mar 2025 23:11:46 +0000 (23:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 12:10:01 +0000 (14:10 +0200)
commitde9b6d0635cc887d2c71f57a3421b6e25715cc54
tree10a2233f312504a70b5e361c5544d3719644b184
parent52daccfc3fa68ee1902d52124921453d7a335591
HID: thrustmaster: fix memory leak in thrustmaster_interrupts()

[ Upstream commit 09d546303b370113323bfff456c4e8cff8756005 ]

In thrustmaster_interrupts(), the allocated send_buf is not
freed if the usb_check_int_endpoints() check fails, leading
to a memory leak.

Fix this by ensuring send_buf is freed before returning in
the error path.

Fixes: 50420d7c79c3 ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check")
Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-thrustmaster.c