Re: [PATCH v2 0/4] HID: Fix some memory leaks in drivers/hid
From: Benjamin Tissoires
Date: Thu Feb 19 2026 - 13:22:25 EST
On Thu, 19 Feb 2026 16:43:34 +0100, Günther Noack wrote:
> These patches fix a few memory leaks in HID report descriptor fixups.
>
> FWIW, a good ad-hoc way to look for usages of allocation functions in
> these is:
>
> awk '/static.*report_fixup.*/,/^}/ { print FILENAME, $0 }' drivers/hid/hid-*.c \
> | grep -E '(malloc|kzalloc|kcalloc|kmemdup)'
>
> [...]
Applied to hid/hid.git (for-7.0/upstream-fixes), thanks!
[1/4] HID: Document memory allocation properties of report_fixup()
https://git.kernel.org/hid/hid/c/6b3e458806e3
[2/4] HID: apple: avoid memory leak in apple_report_fixup()
https://git.kernel.org/hid/hid/c/239c15116d80
[3/4] HID: magicmouse: avoid memory leak in magicmouse_report_fixup()
https://git.kernel.org/hid/hid/c/91e8c6e601bd
[4/4] HID: asus: avoid memory leak in asus_report_fixup()
https://git.kernel.org/hid/hid/c/2bad24c17742
Cheers,
--
Benjamin Tissoires <bentiss@xxxxxxxxxx>