Re: [PATCH] riscv: Fix memory leak in module_frob_arch_sections()
From: patchwork-bot+linux-riscv
Date: Mon Oct 27 2025 - 20:51:41 EST
Hello:
This patch was applied to riscv/linux.git (fixes)
by Paul Walmsley <pjw@xxxxxxxxxx>:
On Sun, 26 Oct 2025 17:19:08 +0800 you wrote:
> The current code directly overwrites the scratch pointer with the
> return value of kvrealloc(). If kvrealloc() fails and returns NULL,
> the original buffer becomes unreachable, causing a memory leak.
>
> Fix this by using a temporary variable to store kvrealloc()'s return
> value and only update the scratch pointer on success.
>
> [...]
Here is the summary with links:
- riscv: Fix memory leak in module_frob_arch_sections()
https://git.kernel.org/riscv/c/c42458fcf54b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html