diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-08 11:33:52 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-08 11:33:52 +0000 |
commit | a5dd6bbd4b82ee4ffa7b790b353975a304ced6bb (patch) | |
tree | 716190ed48fee775e7aeb6328be2ddd94f44d969 /src/modules | |
parent | c9d94ba9cd653574ce4aba06d13b130f7a175480 (diff) |
Fix memory leak in helpop config loading, thanks Macgyver.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10631 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_helpop.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 700656a53..9c7d409a8 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -103,14 +103,14 @@ class ModuleHelpop : public Module virtual void ReadConfig() { - ConfigReader *MyConf = new ConfigReader(ServerInstance); + ConfigReader MyConf(ServerInstance); helpop_map.clear(); - for (int i = 0; i < MyConf->Enumerate("helpop"); i++) + for (int i = 0; i < MyConf.Enumerate("helpop"); i++) { - irc::string key = assign(MyConf->ReadValue("helpop", "key", i)); - std::string value = MyConf->ReadValue("helpop", "value", i, true); /* Linefeeds allowed! */ + irc::string key = assign(MyConf.ReadValue("helpop", "key", i)); + std::string value = MyConf.ReadValue("helpop", "value", i, true); /* Linefeeds allowed! */ if (key == "index") { |