diff options
| author | Xu Rao <raoxu@uniontech.com> | 2026-07-31 16:49:26 +0800 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-08-03 20:54:50 +0200 |
| commit | bbff0ccbff360a5498075525005f6a913239a3d7 (patch) | |
| tree | 77aaf2af78acdb7ee0a3c45a9ee75bcd9b2f1f8d /tools/perf/scripts/python | |
| parent | 7a5f1acd06e5d195cf0934b68256536e5404ef47 (diff) | |
HID: roccat: free buffered reports when destroying device
roccat_report_event() duplicates each report with kmemdup() and stores
the allocation in a circular-buffer slot. The allocation is released only
when that slot is reused.
The device destruction paths free struct roccat_device without releasing
reports still stored in cbuf[]. This makes those allocations unreachable
and leaks up to ROCCAT_CBUF_SIZE report buffers per device.
Add a small destructor that frees every buffered report before freeing the
device, and use it in both paths that can destroy a registered device.
Fixes: 206f5f2fcb5f ("HID: roccat: propagate special events of roccat hardware to userspace")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Rao <raoxu@uniontech.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
