]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_helpop.cpp
Fix memory leaks on reloadmodule and spanningtree unload while connecting servers
[user/henk/code/inspircd.git] / src / modules / m_helpop.cpp
index 8f19bd72b739bfbae57e3363b91de7d83e942d2c..43da5b4ac841a6faed8ff885a7836b7160c7e09e 100644 (file)
@@ -133,11 +133,10 @@ class ModuleHelpop : public Module
 
                        helpop_map.clear();
 
-                       for (int i = 0;; i++)
+                       ConfigTagList tags = ServerInstance->Config->ConfTags("helpop");
+                       for(ConfigIter i = tags.first; i != tags.second; ++i)
                        {
-                               ConfigTag* tag = ServerInstance->Config->ConfValue("helpop", i);
-                               if (!tag)
-                                       break;
+                               ConfigTag* tag = i->second;
                                irc::string key = assign(tag->getString("key"));
                                std::string value;
                                tag->readString("value", value, true); /* Linefeeds allowed */