From: Mathieu Desnoyers Date: Sat, 20 Aug 2011 17:50:08 +0000 (-0400) Subject: urcu-bp: do not call munmap for NULL registry at exit X-Git-Tag: v0.6.5~43 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9380711ae3803da72aa1c7cf9ade5c3f93757006;p=userspace-rcu.git urcu-bp: do not call munmap for NULL registry at exit Signed-off-by: Mathieu Desnoyers --- 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); } /*