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: michae...@nvidia.com

Signed-off-by: Michael Baum <michae...@nvidia.com>
Acked-by: Matan Azrad <ma...@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

Reply via email to