diff options
author | Anand V. Avati <avati@gluster.com> | 2009-04-13 14:03:35 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-13 14:55:29 +0530 |
commit | 3fb7252c5ec7edd8c9234d4fcc369fd10707a613 (patch) | |
tree | 53cc1192af3f9079744f78bbb5520b40bf2c3a07 /libglusterfs | |
parent | dc9cdbdc1c03c231ba405e540fac7d6483159bb2 (diff) |
bug fix - arena destruction now calls munmap and not FREE
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/iobuf.c | 6 |
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); } |