From a5dd6bbd4b82ee4ffa7b790b353975a304ced6bb Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 8 Oct 2008 11:33:52 +0000 Subject: 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 --- src/modules/m_helpop.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules') 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") { -- cgit v1.2.3