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

From: Max Staudt

Date: Sat Nov 15 2025 - 23:35:19 EST


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 :)


Thanks for your patch!

Max