summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-02 04:18:42 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-02 04:18:42 +0000
commit0f33be2964f8a47fa89c19c7c69375b46ffd6563 (patch)
tree5bdfabaa1a5de2d6216cc84d5190b93f87bb64ab /src/command_parse.cpp
parent0df7645dbbf073517e8ba32764e86651d9cbd834 (diff)
Leak fix on /rehash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10787 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index e4c987c19..3373f714f 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -593,7 +593,13 @@ const char* CommandParser::LoadCommand(const char* name)
void CommandParser::SetupCommandTable(User* user)
{
- RFCCommands.clear();
+ for (SharedObjectList::iterator command = RFCCommands.begin(); command != RFCCommands.end(); command++)
+ {
+ Command *cmdptr = cmdlist.find(command->first)->second;
+ cmdlist.erase(cmdlist.find(command->first));
+ RFCCommands.erase(command);
+ delete cmdptr;
+ }
if (!user)
{