public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Zilin Guan <zilin@seu.edu.cn>
Cc: conor@kernel.org, Conor Dooley <conor.dooley@microchip.com>,
	daire.mcnamara@microchip.com, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
Date: Thu, 15 Jan 2026 19:17:02 +0000	[thread overview]
Message-ID: <20260115-jukebox-material-b3a74f84744a@spud> (raw)
In-Reply-To: <20251228124836.3681318-1-zilin@seu.edu.cn>

From: Conor Dooley <conor.dooley@microchip.com>

On Sun, 28 Dec 2025 12:48:36 +0000, Zilin Guan wrote:
> In mpfs_sys_controller_probe(), if of_get_mtd_device_by_node() fails,
> the function returns immediately without freeing the allocated memory
> for sys_controller, leading to a memory leak.
> 
> Fix this by jumping to the out_free label to ensure the memory is
> properly freed.
> 
> [...]

Applied to riscv-soc-fixes, thanks!

[1/1] soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
      https://git.kernel.org/conor/c/5a741f8cc6fe

Thanks,
Conor.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

      reply	other threads:[~2026-01-15 19:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28 12:48 [PATCH] soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe() Zilin Guan
2026-01-15 19:17 ` Conor Dooley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260115-jukebox-material-b3a74f84744a@spud \
    --to=conor@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=daire.mcnamara@microchip.com \
    --cc=jianhao.xu@seu.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=zilin@seu.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox