summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-06-16 21:48:03 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-22 23:16:13 -0700
commit10d3dfe91c1f0eb185fc4ca88be77a200f992c61 (patch)
tree79170f05d9112a983748c30813555e29b32996f5 /xlators
parent7ac6287fb65bdddf3874f3a2c2602e857fbc6b87 (diff)
performance/io-cache: destroy table->mem_pool in fini.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 995 (memory leak in io-cache) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=995
Diffstat (limited to 'xlators')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 2f26b076b12..e548c965c31 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);