summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 3d6c419c9..e396c766e 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -184,6 +184,7 @@ class ModuleDNSBL : public Module
virtual ~ModuleDNSBL()
{
+ ClearEntries();
}
virtual Version GetVersion()
@@ -196,13 +197,26 @@ class ModuleDNSBL : public Module
List[I_OnRehash] = List[I_OnUserRegister] = 1;
}
+
+ void ClearEntries()
+ {
+ std::vector<DNSBLConfEntry *>::iterator i, safei;
+ while ((i = DNSBLConfEntries.begin()) != DNSBLConfEntries.end())
+ {
+ DNSBLConfEntries.erase(i);
+ delete *i;
+ }
+
+ }
+
+
/*
* Fill our conf vector with data
*/
virtual void ReadConf()
{
ConfigReader *MyConf = new ConfigReader(ServerInstance);
- DNSBLConfEntries.clear();
+ ClearEntries();
for (int i=0; i< MyConf->Enumerate("dnsbl"); i++)
{