From 3fb7252c5ec7edd8c9234d4fcc369fd10707a613 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Mon, 13 Apr 2009 14:03:35 +0530 Subject: bug fix - arena destruction now calls munmap and not FREE Signed-off-by: Anand V. Avati --- libglusterfs/src/iobuf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/iobuf.c') diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index cc2f972f5..3ca87ca65 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); } -- cgit