summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-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 503e3da1f..45ecefe9c 100644
--- a/libc/stdlib/atexit.c
+++ b/libc/stdlib/atexit.c
@@ -46,7 +46,8 @@ static void atexit_handler(void)
for (count = __atexit_count ; count-- ; ) {
(*__atexit_table[count])();
}
- __stdio_close_all();
+ if (__stdio_close_all)
+ __stdio_close_all();
}
int atexit(vfuncp ptr)