From 54c40bbfb48e2f7469149d6724e2ac77bce0690a Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Tue, 14 Apr 2009 14:51:26 +0530 Subject: use MAP_FAILED macro to free mem_base in arena_destroy Signed-off-by: Anand V. Avati --- libglusterfs/src/iobuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/iobuf.c') diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index 5ef5d2848..af798c4b6 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); -- cgit