changeset 3367:b0b5852622e4

Fixed leak in RestoreLoggingMemento
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 13 May 2019 16:15:02 +0200
parents 7a4d586caf2d
children 3cd94bc66731
files Core/Logging.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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);