lkml.org 
[lkml]   [2023]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] EDAC: highbank: Fix memory leak in highbank_mc_probe
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@gmail.com>
> ---
> 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

\
 
 \ /
  Last update: 2023-03-26 23:26    [W:0.042 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site