DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5/hws: fix memory leak on general pool db init
@ 2023-01-11 19:49 Alex Vesker
  2023-01-26 12:34 ` Matan Azrad
  2023-02-12 13:34 ` Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Vesker @ 2023-01-11 19:49 UTC (permalink / raw)
  To: valex, viacheslavo, thomas, suanmingm, Matan Azrad; +Cc: dev, orika

On elemend db init we allocated the element_manager
which was unused and not freed.

Fixes: b4dd7bcb0dcbe ("net/mlx5/hws: add pool and buddy")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Reviewed-by: Erez Shitrit <erezsh@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_pool.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_pool.c b/drivers/net/mlx5/hws/mlx5dr_pool.c
index fdbd3d438d..af6a5c743b 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pool.c
+++ b/drivers/net/mlx5/hws/mlx5dr_pool.c
@@ -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;
-- 
2.18.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-12 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11 19:49 [PATCH] net/mlx5/hws: fix memory leak on general pool db init Alex Vesker
2023-01-26 12:34 ` Matan Azrad
2023-02-12 13:34 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).