From: Mathieu Desnoyers Date: Wed, 22 Jun 2016 19:50:21 +0000 (-0400) Subject: Fix: memory leak on hash table destroy X-Git-Tag: v0.8.10~12 X-Git-Url: http://git.liburcu.org/?p=userspace-rcu.git;a=commitdiff_plain;h=96bd49dfcb6476da907cf7ebd9e245014879e9f2 Fix: memory leak on hash table destroy There is a missing call to pthread_mutex_destroy(3) to match pthread_mutex_init(3) in the hash table creation. Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index 2e90d4d..242a467 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -1806,6 +1806,9 @@ int cds_lfht_destroy(struct cds_lfht *ht, pthread_attr_t **attr) free_split_items_count(ht); if (attr) *attr = ht->resize_attr; + ret = pthread_mutex_destroy(&ht->resize_mutex); + if (ret) + ret = -EBUSY; poison_free(ht); end: return ret;