Re: [PATCH net-next v2] net: sfp: fix hwmon_name memory leak on hwmon registration failure

[email protected]
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel
Message-ID <178640761213.266182.11248058007964442666.git-patchwork-notify@kernel.org>
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <[email protected]>:

On Sun,  9 Aug 2026 12:15:04 +0530 you wrote:
> hwmon_sanitize_name() allocates sfp->hwmon_name before
> hwmon_device_register_with_info() is called. If the registration
> fails, sfp->hwmon_dev is left pointing to an error while
> sfp->hwmon_name remains allocated.
> 
> Later, when the SFP module is removed, sfp_hwmon_remove() only frees
> hwmon_name when hwmon_dev is valid. As a result, hwmon_name is leaked
> if hwmon_device_register_with_info() fails.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: sfp: fix hwmon_name memory leak on hwmon registration failure
    https://git.kernel.org/netdev/net-next/c/20232e99e8bf

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.