diff Core/Logging.cpp @ 3367:b0b5852622e4

Fixed leak in RestoreLoggingMemento
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 13 May 2019 16:15:02 +0200
parents ea07b29c6d0e
children a5e225eac0a9
line wrap: on
line diff
--- a/Core/Logging.cpp	Mon May 13 16:04:45 2019 +0200
+++ b/Core/Logging.cpp	Mon May 13 16:15:02 2019 +0200
@@ -508,6 +508,7 @@
       if (!memento->valid_)
         throw std::runtime_error("Memento already used");
       memento->valid_ = false;
+      std::auto_ptr<LoggingMementoImpl> deleter(memento);
       {
         boost::mutex::scoped_lock lock(loggingMutex_);
         loggingContext_.reset(new LoggingContext);