From 9380711ae3803da72aa1c7cf9ade5c3f93757006 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 20 Aug 2011 13:50:08 -0400 Subject: [PATCH] urcu-bp: do not call munmap for NULL registry at exit Signed-off-by: Mathieu Desnoyers --- urcu-bp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/urcu-bp.c b/urcu-bp.c index 80eaefe..2ae3408 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -373,9 +373,10 @@ end: assert(!ret); } -void rcu_bp_exit() +void rcu_bp_exit(void) { - munmap(registry_arena.p, registry_arena.len); + if (registry_arena.p) + munmap(registry_arena.p, registry_arena.len); } /* -- 2.34.1