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.9.3~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a3d42fe5b141ce03417f555a0387ff38602d6373;p=urcu.git 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 3e78731..d7d107f 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -1799,6 +1799,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;