Re: [PATCH] soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
From: Conor Dooley
Date: Thu Jan 15 2026 - 14:17:07 EST
From: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
On Sun, 28 Dec 2025 12:48:36 +0000, Zilin Guan wrote:
> In mpfs_sys_controller_probe(), if of_get_mtd_device_by_node() fails,
> the function returns immediately without freeing the allocated memory
> for sys_controller, leading to a memory leak.
>
> Fix this by jumping to the out_free label to ensure the memory is
> properly freed.
>
> [...]
Applied to riscv-soc-fixes, thanks!
[1/1] soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
https://git.kernel.org/conor/c/5a741f8cc6fe
Thanks,
Conor.