net/mlx5: fix wrong free function in HWS AGE info
PATCH 1/1 net/mlx5: fix wrong free function in HWS AGE info
In AGE info initialization, the mlx5_hws_q_age_info structure is allocated by "mlx5_malloc" function.
However, in case of failure, this structure is released by "rte_free".
This patch changes it to use "mlx5_free".
--- drivers/net/mlx5/mlx5_hws_cnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/mlx5_hws_cnt.c +1 -1
@@ -1100,7 +1100,7 @@ mlx5_hws_age_info_init(struct rte_eth_dev *dev, uint16_t nb_queues,MLX5_ASSERT (strict_queue);while (qidx--)rte_ring_free (age_info->hw_q_age->aged_lists[qidx]); -rte_free (age_info->hw_q_age); +mlx5_free (age_info->hw_q_age);return -1 ; }
Signature · 1 line
2.25.1
Hi,
Quoted 14 lines
-----Original Message-----
From: Michael Baum <[email protected]>
Sent: Monday, October 24, 2022 4:28 PM
To: [email protected]
Cc: Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Slava Ovsiienko <[email protected]>; Michael Baum <[email protected]>
Subject: [PATCH] net/mlx5: fix wrong free function in HWS AGE infoIn AGE info initialization, the
mlx5_hws_q_age_infostructure is allocated by "mlx5_malloc" function.However, in case of failure, this structure is released by "
rte_free".
Quoted 7 lines
This patch changes it to use "
mlx5_free".Fixes 32c98171674f ("net/mlx5: add HWS AGE action support")Signed-off-by Michael Baum <[email protected]>Acked-by Matan Azrad <[email protected]>
Patch squashed into relevant commit in next-net-mlx,
Kindest regards,
Raslan Darawsheh