aboutsummaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorGravatar danieldg2009-09-02 00:46:44 +0000
committerGravatar danieldg2009-09-02 00:46:44 +0000
commit68e47f5ec2154aa97ff298d4516ca0caf746e51a (patch)
tree1c794501bf1cf8212c90075e46875f3e3dd53265 /src/dns.cpp
parentValgrind cleanup: deallocate RFC modes, clientlist, and uuidlist (diff)
Valgrind cleanup: finish destructor creation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11615 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 5af3fd198..4d06e02ab 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -129,6 +129,10 @@ class RequestTimeout : public Timer
RequestTimeout(unsigned long n, InspIRCd* SI, DNSRequest* watching, int id) : Timer(n, SI->Time()), ServerInstance(SI), watch(watching), watchid(id)
{
}
+ ~RequestTimeout()
+ {
+ Tick(0);
+ }
void Tick(time_t)
{
@@ -143,7 +147,6 @@ class RequestTimeout : public Timer
}
ServerInstance->Res->requests[watchid] = NULL;
delete watch;
- return;
}
}
};
@@ -876,6 +879,8 @@ DNS::~DNS()
ServerInstance->SE->Shutdown(this, 2);
ServerInstance->SE->Close(this);
ServerInstance->Timers->DelTimer(this->PruneTimer);
+ if (cache)
+ delete cache;
}
CachedQuery* DNS::GetCache(const std::string &source)