net/mlx5/hws: fix memory leak on general pool db init
PATCH 1/1 net/mlx5/hws: fix memory leak on general pool db init
On elemend db init we allocated the element_manager which was unused and not freed.
--- drivers/net/mlx5/hws/mlx5dr_pool.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/net/mlx5/hws/mlx5dr_pool.c +0 -7
@@ -464,13 +464,6 @@ static void mlx5dr_pool_general_element_db_uninit(struct mlx5dr_pool *pool)*/ static int mlx5dr_pool_general_element_db_init (struct mlx5dr_pool *pool) { - pool->db.element_manager =simple_calloc (1 ,sizeof (*pool->db.element_manager)); -if (!pool->db.element_manager) { -DR_LOG (ERR ,"No mem for general elemnt_manager" ); - rte_errno =ENOMEM ; -return rte_errno; - } - pool->p_db_uninit = &mlx5dr_pool_general_element_db_uninit; pool->p_get_chunk = &mlx5dr_pool_general_element_db_get_chunk; pool->p_put_chunk = &mlx5dr_pool_general_element_db_put_chunk;
Signature · 1 line
2.18.1
From: Alex Vesker <[email protected]>
Quoted 6 lines
On elemend db init we allocated the
element_managerwhich was unused and not freed.Fixes b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy")Signed-off-by Alex Vesker <[email protected]>Reviewed-by Erez Shitrit <[email protected]>
Hi,
Quoted 10 lines
-----Original Message-----
From: Alex Vesker <[email protected]>
Sent: Wednesday, January 11, 2023 9:49 PM
To: Alex Vesker <[email protected]>; Slava Ovsiienko <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Ori Kam <[email protected]>
Subject: [PATCH]net/mlx5/hws: fix memory leak on general pool db init
Quoted 7 lines
On elemend db init we allocated the
element_managerwhich was unused and not freed.Fixes b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy")Signed-off-by Alex Vesker <[email protected]>Reviewed-by Erez Shitrit <[email protected]>---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh