diff options
Diffstat (limited to 'libglusterfs/src/mem-pool.c')
-rw-r--r-- | libglusterfs/src/mem-pool.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index 56a4a1dc29f..90df2f39e0e 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -197,3 +197,17 @@ 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; +} |