Message ID | 20250414183309.11460-1-qasdev00@gmail.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Jiri Kosina |
Headers | show |
Series | [RESEND] HID: wacom: fix memory leak on size mismatch in wacom_wac_queue_flush() | expand |
… > number of elements it has copied. The code checks if the number > of copied elements does not equal the size of the fifo record, … is? Under which circumstances would you dare to use text lines which would be longer than 63 characters? Can a patch series be more appropriate for the affected software module? Regards, Markus
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 666b7eb0fdfe..3e4f823f8ee8 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -87,6 +87,7 @@ static void wacom_wac_queue_flush(struct hid_device *hdev, // to flush seems reasonable enough, however. hid_warn(hdev, "%s: removed fifo entry with unexpected size\n", __func__); + kfree(buf); continue; } err = hid_report_raw_event(hdev, HID_INPUT_REPORT, buf, size, false);