[Libreoffice-commits] online.git: loolwsd/Util.cpp
Miklos Vajna
vmiklos at collabora.co.uk
Fri Apr 8 07:15:56 UTC 2016
loolwsd/Util.cpp | 1 +
1 file changed, 1 insertion(+)
New commits:
commit c034165a9059b1a83e3ebc70d4568e5a05487cfd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Apr 7 12:12:15 2016 +0200
Util: avoid leaking the channel
Poco::Channel is reference counted, but the initial refcount is 1, so we
need to release channel in order to have it deleted when Poco::Logger
releases it.
Calls to Poco::Logger::shutdown() are still missing though (from
forkit/kit/wsd).
Change-Id: I12ab32047d32e55902c60639d71eb6ef30ffa3bd
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 678b1d7..5e2bd92 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -152,6 +152,7 @@ namespace Log
? static_cast<Poco::Channel*>(new Poco::ColorConsoleChannel())
: static_cast<Poco::Channel*>(new Poco::ConsoleChannel()));
auto& logger = Poco::Logger::create(Source.name, channel, Poco::Message::PRIO_TRACE);
+ channel->release();
// Configure the logger.
// TODO: This should come from a file.
More information about the Libreoffice-commits
mailing list