aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libc/sys.c')
-rw-r--r--libs/libc/sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/libc/sys.c b/libs/libc/sys.c
index cf2165a..8d0a9b8 100644
--- a/libs/libc/sys.c
+++ b/libs/libc/sys.c
@@ -186,6 +186,9 @@ static void (*funcs[ATEXIT_MAX])(void) = { 0 };
static void atexit_trigger(void)
{
+ if (!slot)
+ return;
+
while (slot-- > 0) {
if (funcs[slot]) {
funcs[slot]();