Re: [PATCH v2 net] cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path

From: patchwork-bot+netdevbpf
Date: Wed Apr 16 2025 - 21:00:10 EST


Hello:

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

On Mon, 14 Apr 2025 22:36:46 +0530 you wrote:
> In the for loop used to allocate the loc_array and bmap for each port, a
> memory leak is possible when the allocation for loc_array succeeds,
> but the allocation for bmap fails. This is because when the control flow
> goes to the label free_eth_finfo, only the allocations starting from
> (i-1)th iteration are freed.
>
> Fix that by freeing the loc_array in the bmap allocation error path.
>
> [...]

Here is the summary with links:
- [v2,net] cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
https://git.kernel.org/netdev/net/c/00ffb3724ce7

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