hash: fix memory leak of hash_rcu_cfg
Checks
Commit Message
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@dpdk.org
Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com>
---
lib/hash/rte_cuckoo_hash.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, Nov 4, 2022 at 10:52 AM Jun Qiu <jun.qiu@jaguarmicro.com> wrote:
>
> 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")
Please, use 12 chars format for commit hash, as documented.
git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h
(\"%s\")%nCc: %ae'"
> Cc: stable@dpdk.org
>
> Signed-off-by: Jun Qiu <jun.qiu@jaguarmicro.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Applied, thanks.
@@ -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);
}