[PATCH] i3c: dw: Fix memory leak in dw_i3c_master_i2c_xfers()
Alexandre Belloni
alexandre.belloni at bootlin.com
Fri Jan 30 15:08:36 PST 2026
On Mon, 26 Jan 2026 08:11:21 +0000, Zilin Guan wrote:
> The dw_i3c_master_i2c_xfers() function allocates memory for the xfer
> structure using dw_i3c_master_alloc_xfer(). If pm_runtime_resume_and_get()
> fails, the function returns without freeing the allocated xfer, resulting
> in a memory leak.
>
> Add a dw_i3c_master_free_xfer() call to the error path to ensure the
> allocated memory is properly freed.
>
> [...]
Applied, thanks!
[1/1] i3c: dw: Fix memory leak in dw_i3c_master_i2c_xfers()
https://git.kernel.org/i3c/c/253708941351
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-i3c
mailing list