summaryrefslogtreecommitdiffstats
path: root/libc/unistd/abort.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/abort.c')
-rw-r--r--libc/unistd/abort.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/unistd/abort.c b/libc/unistd/abort.c
index 3291287..a02beba 100644
--- a/libc/unistd/abort.c
+++ b/libc/unistd/abort.c
@@ -56,9 +56,11 @@ abort(void)
if (cleanup_called == 0) {
while (p != NULL && p->next != NULL)
p = p->next;
- if (p != NULL && p->fns[0] != NULL) {
+ /* the check for fn_dso == NULL is mostly paranoia */
+ if (p != NULL && p->fns[0].fn_dso == NULL &&
+ p->fns[0].fn_ptr.std_func != NULL) {
cleanup_called = 1;
- (*p->fns[0])();
+ (*p->fns[0].fn_ptr.std_func)();
}
}