aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/sys.c
diff options
context:
space:
mode:
authorMarvin Borner2021-05-19 00:43:40 +0200
committerMarvin Borner2021-05-19 00:43:40 +0200
commit98df498e8e8a07e33cc77a059876b940cb9b3c6a (patch)
tree57a2ff0fab411c91fba5512827c18124b092aa5d /libs/libc/sys.c
parent45bfdffcb2e00fda595b3f9318469f6b0d29cbe4 (diff)
Smashed some bugs
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]();