From 335fc8ab23d506d2d895c47526065d2fc66ea55e Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 22 Jul 2017 10:46:45 +0100 Subject: mlog: fix crash accessing stale data when rotating logs --- contrib/epee/src/mlog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/epee/src') diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp index a51654d36..a3f38e677 100644 --- a/contrib/epee/src/mlog.cpp +++ b/contrib/epee/src/mlog.cpp @@ -129,7 +129,7 @@ void mlog_configure(const std::string &filename_base, bool console) el::Loggers::addFlag(el::LoggingFlag::DisableApplicationAbortOnFatalLog); el::Loggers::addFlag(el::LoggingFlag::ColoredTerminalOutput); el::Loggers::addFlag(el::LoggingFlag::StrictLogFileSizeCheck); - el::Helpers::installPreRollOutCallback([&filename_base](const char *name, size_t){ + el::Helpers::installPreRollOutCallback([filename_base](const char *name, size_t){ std::string rname = generate_log_filename(filename_base.c_str()); rename(name, rname.c_str()); }); -- cgit v1.2.3