diff options
Diffstat (limited to 'src/LYexit.c')
-rw-r--r-- | src/LYexit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/LYexit.c b/src/LYexit.c index 74ce16c3..9567cb1b 100644 --- a/src/LYexit.c +++ b/src/LYexit.c @@ -113,7 +113,13 @@ PUBLIC void LYexit ARGS1( printf("\r\n%s\r\n\r\n", MEMORY_EXHAUSTED_ABORT); fflush(stdout); } - *stderr = LYOrigStderr; + if (LYTraceLogFP != NULL) { + fflush(stdout); + fflush(stderr); + fclose(LYTraceLogFP); + LYTraceLogFP = NULL; + *stderr = LYOrigStderr; + } #endif /* !VMS */ exit(status); } |