summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/mem-pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/mem-pool.c')
-rw-r--r--libglusterfs/src/mem-pool.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 56a4a1dc29f..cdc275e1c4f 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -197,3 +197,16 @@ mem_put (struct mem_pool *pool, void *ptr)
}
UNLOCK (&pool->lock);
}
+
+void
+mem_pool_destroy (struct mem_pool *pool)
+{
+ if (!pool)
+ return;
+
+ LOCK_DESTROY (&pool->lock);
+ FREE (pool->pool);
+ FREE (pool);
+
+ return;
+}