Re: [PATCH v2] HID: hid-ntrig: Prevent memory leak in ntrig_report_version()
From: Jiri Kosina
Date: Fri Oct 31 2025 - 04:59:04 EST
On Sun, 21 Sep 2025, Masami Ichikawa wrote:
> Use a scope-based cleanup helper for the buffer allocated with kmalloc()
> in ntrig_report_version() to simplify the cleanup logic and prevent
> memory leaks.
>
> Fixes: 185c926283da ("HID: hid-ntrig: fix unable to handle page fault in ntrig_report_version()")
> Signed-off-by: Masami Ichikawa <masami256@xxxxxxxxx>
I have added an explicit reference to the real actual leak being fixed
into the changelog, and applied, thanks.
--
Jiri Kosina
SUSE Labs