diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-19 04:09:38 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-19 04:09:38 +0000 |
commit | f3e45bfb0e74d431fcb4a2fcd0c024f73f73e7c2 (patch) | |
tree | 490a6efe0f5e4d06e5bd2e31ca33bf931544fc6b /src/modules/m_httpd.cpp | |
parent | 33141a0825e7cf2dcd0cae63da8943626d8a06b6 (diff) |
Valgrind now runs completely clean.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11916 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r-- | src/modules/m_httpd.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 2991b524e..76e89666a 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -60,10 +60,6 @@ class HttpServerSocket : public BufferedSocket return index; } - ~HttpServerSocket() - { - } - virtual void OnError(BufferedSocketError) { } @@ -347,6 +343,11 @@ class HttpListener : public ListenSocketBase this->index = idx; } + ~HttpListener() + { + delete index; + } + virtual void OnAcceptReady(int nfd) { int port; @@ -383,7 +384,10 @@ class ModuleHttpServer : public Module indexfile = c.ReadValue("http", "index", i); index = new FileReader(indexfile); if (!index->Exists()) + { + delete index; throw ModuleException("Can't read index file: "+indexfile); + } http = new HttpListener(index, port, bindip); httplisteners.push_back(http); } @@ -408,14 +412,14 @@ class ModuleHttpServer : public Module { for (size_t i = 0; i < httplisteners.size(); i++) { + httplisteners[i]->cull(); delete httplisteners[i]; } for (size_t i = 0; i < httpsocks.size(); i++) { - ServerInstance->SE->DelFd(httpsocks[i]); - httpsocks[i]->Close(); - delete httpsocks[i]->GetIndex(); + httpsocks[i]->cull(); + delete httpsocks[i]; } } |