projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
384b6b4
)
frontend_net: fix memory leak
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 18 Mar 2014 14:01:07 +0000
(15:01 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 18 Mar 2014 14:01:07 +0000
(15:01 +0100)
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
patch
|
blob
|
history
diff --git
a/src/thread_pool_observer.cpp
b/src/thread_pool_observer.cpp
index
8353f5b
..
a52cd92
100644
(file)
--- 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++;
}