]> git.lttng.org Git - userspace-rcu.git/commitdiff
urcu-bp: do not call munmap for NULL registry at exit
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 17:50:08 +0000 (13:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 17:50:08 +0000 (13:50 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-bp.c

index 80eaefe7ea78a35cd20d138bcb9ac6ebd08c31b4..2ae3408c25fd42cc6788c6ec8664c91cf9868d87 100644 (file)
--- 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);
 }
 
 /*
This page took 0.029677 seconds and 4 git commands to generate.