Re: [PATCH net v2] dpll: zl3073x: fix memory leak on pin registration failure
From: patchwork-bot+netdevbpf
Date: Wed May 20 2026 - 22:13:28 EST
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Tue, 19 May 2026 15:22:05 +0200 you wrote:
> If zl3073x_dpll_pin_register() fails, the allocated pin is not yet
> added to zldpll->pins list. The error path calls
> zl3073x_dpll_pins_unregister() which only iterates pins on the list,
> so the current pin is leaked. Free the pin before jumping to the error
> label.
>
> Additionally move the pin->dpll_pin = NULL assignment in
> zl3073x_dpll_pin_register() from err_register to the common
> err_pin_get path. When dpll_pin_get() fails, pin->dpll_pin holds an
> ERR_PTR value. Without this fix the subsequent zl3073x_dpll_pin_free()
> would trigger a spurious WARN because it checks pin->dpll_pin for
> non-NULL.
>
> [...]
Here is the summary with links:
- [net,v2] dpll: zl3073x: fix memory leak on pin registration failure
https://git.kernel.org/netdev/net/c/fa997ddef508
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html