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.10.0~37 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;ds=sidebyside;h=59629f09c1ee8395b1e22797a6924703e825e345;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;