diff options
| author | Günther Noack <gnoack@google.com> | 2026-02-19 16:43:38 +0100 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2026-02-19 18:57:38 +0100 |
| commit | 2bad24c17742fc88973d6aea526ce1353f5334a3 (patch) | |
| tree | 6388d4e0a3eb9e78db06c4d3936d70f608ecc5a1 /tools/perf/scripts/python | |
| parent | 91e8c6e601bdc1ccdf886479b6513c01c7e51c2c (diff) | |
| download | linux-2bad24c17742fc88973d6aea526ce1353f5334a3.tar.gz linux-2bad24c17742fc88973d6aea526ce1353f5334a3.zip | |
HID: asus: avoid memory leak in asus_report_fixup()
The asus_report_fixup() function was returning a newly allocated
kmemdup()-allocated buffer, but never freeing it. Switch to
devm_kzalloc() to ensure the memory is managed and freed automatically
when the device is removed.
The caller of report_fixup() does not take ownership of the returned
pointer, but it is permitted to return a pointer whose lifetime is at
least that of the input buffer.
Also fix a harmless out-of-bounds read by copying only the original
descriptor size.
Assisted-by: Gemini-CLI:Google Gemini 3
Signed-off-by: Günther Noack <gnoack@google.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
