diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-02 03:15:46 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-02 03:15:46 +0000 |
commit | 8456cf5ccd44911f4e56538fe0880dd7fc7cd96d (patch) | |
tree | 3e1f96b94cc86506a615d8b39131ff6ea7c1b64c /src/inspircd.cpp | |
parent | 87d031609bb8b7d2cd186d8f24bcb853fd93798c (diff) |
Fix valgrind issues and crashes on exit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11794 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index b815ce4ac..2a9f506bc 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -111,11 +111,15 @@ void InspIRCd::Cleanup() Users->QuitUser(u, "Server shutdown"); } + /* Cleanup Server Names */ + for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr) + delete (*itr); + /* We do this more than once, so that any service providers get a * chance to be unhooked by the modules using them, but then get * a chance to be removed themsleves. * - * XXX there may be a better way to do this with 1.2 + * XXX there may be a better way to do this */ for (int tries = 0; tries < 4; tries++) { @@ -125,12 +129,9 @@ void InspIRCd::Cleanup() /* Unload all modules, so they get a chance to clean up their listeners */ this->Modules->Unload(k->c_str()); } + GlobalCulls.Apply(); } - /* Cleanup Server Names */ - for(servernamelist::iterator itr = servernames.begin(); itr != servernames.end(); ++itr) - delete (*itr); - /* Delete objects dynamically allocated in constructor (destructor would be more appropriate, but we're likely exiting) */ /* Must be deleted before modes as it decrements modelines */ DeleteZero(this->FakeClient); |