summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/iobuf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index cc2f972f530..3ca87ca65d0 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -88,13 +88,17 @@ __iobuf_arena_destroy_iobufs (struct iobuf_arena *iobuf_arena)
void
__iobuf_arena_destroy (struct iobuf_arena *iobuf_arena)
{
+ struct iobuf_pool *iobuf_pool = NULL;
+
if (!iobuf_arena)
return;
+ iobuf_pool = iobuf_arena->iobuf_pool;
+
__iobuf_arena_destroy_iobufs (iobuf_arena);
if (iobuf_arena->mem_base)
- FREE (iobuf_arena->mem_base);
+ munmap (iobuf_arena->mem_base, iobuf_pool->arena_size);
FREE (iobuf_arena);
}