diff --git a/libs/libc/stdlib/lib_exit.c b/libs/libc/stdlib/lib_exit.c index 2cef9eff1b..7d82ffdc21 100644 --- a/libs/libc/stdlib/lib_exit.c +++ b/libs/libc/stdlib/lib_exit.c @@ -88,9 +88,11 @@ void exit(int status) atexit_call_exitfuncs(status, false); +#ifdef CONFIG_FILE_STREAM /* Flush all streams */ fflush(NULL); +#endif /* Then perform the exit */