diff options
author | Anand V. Avati <avati@gluster.com> | 2009-04-14 14:51:26 +0530 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-14 15:00:38 +0530 |
commit | 54c40bbfb48e2f7469149d6724e2ac77bce0690a (patch) | |
tree | 8e80064c45c48e07a1b0678e9284f07fec71d5e7 /libglusterfs/src/iobuf.c | |
parent | 1ce5acccf5186e70424826d4f22cee3a29ac114e (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |