lkml.org 
[lkml]   [2023]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] clk: hi3620: Fix memory leak in hi3620_mmc_clk_init()
From
Date
Quoting Kuan-Wei Chiu (2023-12-10 08:50:40)
> In cases where kcalloc() fails for the 'clk_data->clks' allocation, the
> code path does not handle the failure gracefully, potentially leading
> to a memory leak. This fix ensures proper cleanup by freeing the
> allocated memory for 'clk_data' before returning.
>
> Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
> ---

Applied to clk-next

\
 
 \ /
  Last update: 2023-12-17 02:14    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog