All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun Qiu <jun.qiu@jaguarmicro.com>
To: dev@dpdk.org
Cc: yipeng1.wang@intel.com
Subject: [PATCH] hash: fix memory leak of hash_rcu_cfg
Date: Fri,  4 Nov 2022 07:33:58 +0000	[thread overview]
Message-ID: <20221104073358.421827-1-jun.qiu@jaguarmicro.com> (raw)

The memory of h->hash_rcu_cfg which allocated in
rte_hash_rcu_qsbr_add was leaked.

Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 62c762439a..829b79c89a 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -521,6 +521,7 @@ rte_hash_free(struct rte_hash *h)
 	rte_free(h->buckets_ext);
 	rte_free(h->tbl_chng_cnt);
 	rte_free(h->ext_bkt_to_free);
+	rte_free(h->hash_rcu_cfg);
 	rte_free(h);
 	rte_free(te);
 }
-- 
2.25.1


             reply	other threads:[~2022-11-04  7:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  7:33 Jun Qiu [this message]
2022-11-04  9:51 [PATCH] hash: fix memory leak of hash_rcu_cfg Jun Qiu
2022-11-14 10:03 ` David Marchand

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=20221104073358.421827-1-jun.qiu@jaguarmicro.com \
    --to=jun.qiu@jaguarmicro.com \
    --cc=dev@dpdk.org \
    --cc=yipeng1.wang@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.