diff options
| author | 2008-11-02 04:18:52 +0000 | |
|---|---|---|
| committer | 2008-11-02 04:18:52 +0000 | |
| commit | c119d290bc3767204968a563073756a66d15e3d6 (patch) | |
| tree | a99635faba01be9b1ea4af8ffe4e751752bfda56 /src/command_parse.cpp | |
| parent | Backport race condition fixes. (diff) | |
Backport leak on /rehash fix.
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@10788 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
| -rw-r--r-- | src/command_parse.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index f072cdbb9..1ca24fcb3 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -552,7 +552,13 @@ const char* CommandParser::LoadCommand(const char* name) void CommandParser::SetupCommandTable(userrec* user) { - RFCCommands.clear(); + for (SharedObjectList::iterator command = RFCCommands.begin(); command != RFCCommands.end(); command++) + { + command_t *cmdptr = cmdlist.find(command->first)->second; + cmdlist.erase(cmdlist.find(command->first)); + RFCCommands.erase(command); + delete cmdptr; + } if (!user) { |
