[PATCH] net/mlx5: fix wrong free function in HWS AGE info
Michael Baum
michaelba at nvidia.com
Mon Oct 24 15:28:23 CEST 2022
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".
Fixes: 32c98171674f ("net/mlx5: add HWS AGE action support")
Cc: michaelba at nvidia.com
Signed-off-by: Michael Baum <michaelba at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
drivers/net/mlx5/mlx5_hws_cnt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index 9c37700f94..b8ce69af57 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -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;
}
--
2.25.1
More information about the dev
mailing list