[PATCH] hash: fix memory leak of hash_rcu_cfg

Jun Qiu jun.qiu at jaguarmicro.com
Fri Nov 4 10:51:23 CET 2022


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

Fixes: 769b2de ("hash: implement RCU resources reclamation")
Cc: stable at dpdk.org

Signed-off-by: Jun Qiu <jun.qiu at 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



More information about the stable mailing list