[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7ad7ccba-5ef7-48b7-ae45-f631e574df3b@web.de>
Date: Tue, 3 Feb 2026 17:00:44 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Felix Gu <ustc.gu@...il.com>, linux-riscv@...ts.infradead.org,
Conor Dooley <conor.dooley@...rochip.com>,
Daire McNamara <daire.mcnamara@...rochip.com>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] soc: microchip: mpfs: Fix a memory leak in
mpfs_sys_controller_probe()
> In mpfs_sys_controller_probe(), when of_get_mtd_device_by_node() fails,
> the previously allocated sys_controller was leaked.
>
> Add kfree() to fix this.
https://elixir.bootlin.com/linux/v6.19-rc5/source/drivers/soc/microchip/mpfs-sys-controller.c#L128-L177
* Were any source code analysis tools involved here?
* Would you like to complete the exception handling by using another goto chain?
* How do you think about to increase the application of scope-based resource management?
* See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v6.19-rc8#n34
Regards,
Markus
Powered by blists - more mailing lists