From bc947d4c7b9b7691e2aeab608c78c4658314cec2 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 2 Aug 2014 21:54:30 +0200 Subject: [PATCH] Fixed a va_list corruption in logv_error() --- kernel/log.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/log.cc b/kernel/log.cc index 81cc26da3..09673dc2e 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -113,12 +113,11 @@ void logv_header(const char *format, va_list ap) void logv_error(const char *format, va_list ap) { + if (log_errfile != NULL) + log_files.push_back(log_errfile); + log("ERROR: "); logv(format, ap); - if (log_errfile != NULL) { - fprintf(log_errfile, "ERROR: "); - vfprintf(log_errfile, format, ap); - } log_flush(); exit(1); } -- 2.30.2