aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/exec.c b/exec.c
index 0e415a5e9b..c782e5b6b2 100644
--- a/exec.c
+++ b/exec.c
@@ -1286,6 +1286,10 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
cpu_dump_state(env, stderr, fprintf, 0);
#endif
va_end(ap);
+ if (logfile) {
+ fflush(logfile);
+ fclose(logfile);
+ }
abort();
}