Re: [PATCH net] net: dsa: realtek: fix memory leak in rtl8366rb_setup_led()

From: patchwork-bot+netdevbpf

Date: Wed Jun 24 2026 - 21:11:29 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Thu, 18 Jun 2026 22:01:55 +0800 you wrote:
> led_classdev_register_ext() only reads init_data.devicename - it never
> stores the pointer. However, the caller allocated devicename with
> kasprintf() but never freed it, leaking the string memory.
>
> Fix it with a stack buffer to avoid dynamic buffers completely.
>
> Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> Signed-off-by: David Yang <mmyangfl@xxxxxxxxx>
>
> [...]

Here is the summary with links:
- [net] net: dsa: realtek: fix memory leak in rtl8366rb_setup_led()
https://git.kernel.org/netdev/net/c/056a5087d87e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html