summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/atexit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c
index d7be35fbd..af739d52b 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -159,7 +159,8 @@ void exit(int rv)
}
/* Clean up everything else */
- __uClibc_cleanup();
+ if (__uClibc_cleanup) {
+ __uClibc_cleanup();
_exit(rv);
}