On Mon, 8 Sept 2025 at 04:02, Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> wrote: > > In the current implementation, when krealloc_array() fails, the error handling path > > incorrectly sets the original memory pointer to NULL before it is freed, > > resulting in a memory leak during reallocation failure. > > > > Fixes: 6aa17547649 ("clk: renesas: cpg-mssr: Ignore all clocks assigned to non-Linux system") > > Signed-off-by: Yuan CHen <chenyuan@xxxxxxxxxx> > > You want to use ${LINUX}/scripts/checkpatch.pl to get maximum 75 chars warning > > Patch itself is agree, but I still don't understand the git-log. > > incorrectly sets the original memory pointer to NULL before it is freed, > > I still don't understand this part. which part are you talking about ? > What does this "original memory pointer" mean ? And what does this "freed" > mean ? freed what ?? > > I guess you want to indicate is like this ? > > In case of krealloc_array() failure, current error handling just > returns from function without freeing alloced array. > It cause a memory leak. Fixup it. Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> i.e. will queue in renesas-clk for v6.18, with the patch description reworded. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds