diff --git a/lib/MySQL_Logger.cpp b/lib/MySQL_Logger.cpp index b3d563a0c..73b8fbae7 100644 --- a/lib/MySQL_Logger.cpp +++ b/lib/MySQL_Logger.cpp @@ -234,7 +234,8 @@ void MySQL_Event::write_auth(std::fstream *f, MySQL_Session *sess) { } // for performance reason, we are moving the write lock // right before the write to disk - GloMyLogger->wrlock(); + //GloMyLogger->wrlock(); + //move wrlock() function to log_audit_entry() function, avoid to get a null pointer in a multithreaded environment *f << j.dump(-1, ' ', false, json::error_handler_t::replace) << std::endl; }