Friendly ping
> -----Original Message-----
> From: Wangyunjian <[email protected]>
> Sent: Thursday, December 18, 2025 6:57 PM
> To: [email protected]
> Cc: [email protected]; [email protected]; Lilijun (Jerry)
> <[email protected]>; Wangyunjian <[email protected]>;
> [email protected]
> Subject: [PATCH v2] net/mlx5: fix memoy leak after device spawn failure
>
> In mlx5_dev_spawn() allocated memory for the 'priv->flows', we should free it
> when errors occur, otherwise it will lead to memory leak.
>
> Fixes: b4edeaf3efd5 ("net/mlx5: replace flow list with indexed pool")
> Cc: [email protected]
>
> Signed-off-by: Yunjian Wang <[email protected]>
> ---
> v2: fix code styles
> ---
> drivers/net/mlx5/linux/mlx5_os.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c
> b/drivers/net/mlx5/linux/mlx5_os.c
> index 7f73183bb1..7624b2aba2 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -1831,6 +1831,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
> close(priv->nl_socket_route);
> if (priv->vmwa_context)
> mlx5_vlan_vmwa_exit(priv->vmwa_context);
> + for (i = 0; i < MLX5_FLOW_TYPE_MAXI; i++) {
> + if (!priv->flows[i])
> + continue;
> + mlx5_ipool_destroy(priv->flows[i]);
> + }
> if (eth_dev && priv->drop_queue.hrxq)
> mlx5_drop_action_destroy(eth_dev);
> if (priv->mtr_profile_tbl)
> --
> 2.33.0