Re: [PATCH v2] HID: memory leak in dualshock4_get_calibration_data

From: Eslam Khafagy

Date: Sun Nov 16 2025 - 10:09:16 EST



On 11/16/25 06:34, Max Staudt wrote:
On 11/16/25 11:27 AM, Eslam Khafagy wrote:
function dualshock4_get_calibration_data allocates memory to pointer
buf. however the function may exit prematurely due to transfer_failure
in this case it does not handle freeing memory.

this patch handles memory deallocation at exit.

Reviewed-by: Max Staudt <max@xxxxxxxxx>


One minor thing that I forgot: I see that the commit message is all lower case. Proper capitalisation helps readability and matches the kernel style. No need to resend this time, but in case you're sending a v3 for any other reason, it'd be great if you picked this up as well :)

Oh, ok. but, no plans for v3 for now.
Thanks for your patch!

welcome
Max