Re: [PATCH v3] HID: memory leak in dualshock4_get_calibration_data
From: Markus Elfring
Date: Sat Nov 22 2025 - 13:15:45 EST
> Function dualshock4_get_calibration_data allocates memory to pointer
> buf .However, the function may exit prematurely due to transfer_failure
transfer failure.?
> in this case it does not handle freeing memory.
>
> This patch handles memory deallocation at exit.
Would a corresponding imperative wording become helpful for an improved change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.18-rc6#n94
Would a summary phrase like “Prevent memory leak in dualshock4_get_calibration_data()”
be nicer?
Regards,
Markus