From dc2b8231ac2e47a34f5742ae5b5a1e5cf0ad4c98 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 18 Mar 2014 15:01:07 +0100 Subject: [PATCH] frontend_net: fix memory leak This leak would occur if all sessions were in use and the input queue was cleared when a client would close connection (socket). --- src/thread_pool_observer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/thread_pool_observer.cpp b/src/thread_pool_observer.cpp index 8353f5b..a52cd92 100644 --- a/src/thread_pool_observer.cpp +++ b/src/thread_pool_observer.cpp @@ -220,7 +220,10 @@ void ThreadPoolSocketObserver::cleanup(IThreadPoolMsg *m, void *info) while (it != m_p->m_input.end()) { if ((*it)->cleanup(info)) + { + delete *it; it = m_p->m_input.erase(it); + } else it++; } -- 1.7.10.4