# HG changeset patch
# User Benjamin Golinvaux <bgo@osimis.io>
# Date 1557756902 -7200
# Node ID b0b5852622e48ba4b907f1eefe7322e441834cb1
# Parent  7a4d586caf2d2d4dd6556d97cf8cc553b3c2351d
Fixed leak in RestoreLoggingMemento

diff -r 7a4d586caf2d -r b0b5852622e4 Core/Logging.cpp
--- 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);