From: Alex Vesker <valex@nvidia.com>
To: <valex@nvidia.com>, <viacheslavo@nvidia.com>,
<thomas@monjalon.net>, <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>, <orika@nvidia.com>
Subject: [PATCH] net/mlx5/hws: fix memory leak on general pool db init
Date: Wed, 11 Jan 2023 21:49:03 +0200 [thread overview]
Message-ID: <20230111194903.27180-1-valex@nvidia.com> (raw)
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
next reply other threads:[~2023-01-11 19:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 19:49 Alex Vesker [this message]
2023-01-26 12:34 ` Matan Azrad
2023-02-12 13:34 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230111194903.27180-1-valex@nvidia.com \
--to=valex@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).