Re: [PATCH] EDAC: highbank: Fix memory leak in highbank_mc_probe

From: Borislav Petkov
Date: Tue Jan 03 2023 - 11:41:24 EST


On Thu, Dec 29, 2022 at 09:48:24AM +0400, Miaoqian Lin wrote:
> edac_mc_alloc() allocates memory. The memory are not released
> when devres_open_group() fails, which causes memory leak.
> Call edac_mc_free() in the error handling to fix this.
>
> Fixes: a1b01edb2745 ("edac: add support for Calxeda highbank memory controller")
> Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
> ---
> altr_sdram_probe() performs similar operations,
> I take it as reference.
> ---
> drivers/edac/highbank_mc_edac.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)

Applied, thanks.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette