From 10d3dfe91c1f0eb185fc4ca88be77a200f992c61 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 16 Jun 2010 21:48:03 +0000 Subject: performance/io-cache: destroy table->mem_pool in fini. Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 995 (memory leak in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=995 --- xlators/performance/io-cache/src/io-cache.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'xlators/performance/io-cache') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 2f26b076..e548c965 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -1568,11 +1568,18 @@ ioc_priv_dump (xlator_t *this) void fini (xlator_t *this) { - ioc_table_t *table = this->private; + ioc_table_t *table = NULL; + + table = this->private; if (table == NULL) return; + if (table->mem_pool != NULL) { + mem_pool_destroy (table->mem_pool); + table->mem_pool = NULL; + } + pthread_mutex_destroy (&table->table_lock); GF_FREE (table); -- cgit