Skip to content

Commit

Permalink
modules/linux: move exit syscall to the end
Browse files Browse the repository at this point in the history
Ensures the function never returns even if the types are corrupted.
  • Loading branch information
matheusmoreira committed Aug 12, 2024
1 parent abc303c commit a8cd649
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/lone/lisp/modules/intrinsic/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ static inline long lone_lisp_value_to_linux_system_call_number(struct lone_lisp
case LONE_LISP_TYPE_NIL:
case LONE_LISP_TYPE_HEAP_VALUE:
case LONE_LISP_TYPE_POINTER:
linux_exit(-1);
break;
}

linux_exit(-1);
}

static inline long lone_lisp_value_to_linux_system_call_argument(struct lone_lisp_value value)
Expand Down

0 comments on commit a8cd649

Please sign in to comment.