summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/iobuf.c
diff options
context:
space:
mode:
authorAnand V. Avati <avati@gluster.com>2009-04-14 14:51:26 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-14 15:00:38 +0530
commit54c40bbfb48e2f7469149d6724e2ac77bce0690a (patch)
tree8e80064c45c48e07a1b0678e9284f07fec71d5e7 /libglusterfs/src/iobuf.c
parent1ce5acccf5186e70424826d4f22cee3a29ac114e (diff)
use MAP_FAILED macro to free mem_base in arena_destroy
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs/src/iobuf.c')
-rw-r--r--libglusterfs/src/iobuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index 5ef5d284812..af798c4b68c 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -99,7 +99,8 @@ __iobuf_arena_destroy (struct iobuf_arena *iobuf_arena)
__iobuf_arena_destroy_iobufs (iobuf_arena);
- if (iobuf_arena->mem_base)
+ if (iobuf_arena->mem_base
+ && iobuf_arena->mem_base != MAP_FAILED)
munmap (iobuf_arena->mem_base, iobuf_pool->arena_size);
FREE (iobuf_arena);