Fix: memory leak on hash table destroy
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Jun 2016 19:50:21 +0000 (15:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Jun 2016 19:52:01 +0000 (15:52 -0400)
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 <mathieu.desnoyers@efficios.com>
rculfhash.c

index 3e7873171733a100d83ea1433c54080cf1b1e791..d7d107f3788f3a70cec57be5380ae1ff1bbff173 100644 (file)
@@ -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;
This page took 0.026341 seconds and 4 git commands to generate.