diff options
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index ca08b93ba..5a79d0d2e 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -126,7 +126,12 @@ class RequestTimeout : public InspTimer /* Still exists, whack it */ if (rl.find(watchid)->second == watch) { - watch->OnError(RESOLVER_TIMEOUT, "Request timed out"); + if (ServerInstance->Res->Classes[watchid]) + { + ServerInstance->Res->Classes[watchid]->OnError(RESOLVER_TIMEOUT, "Request timed out"); + delete ServerInstance->Res->Classes[watchid]; + ServerInstance->Res->Classes[watchid] = NULL; + } rl.erase(rl.find(watchid)); delete watch; ServerInstance->Log(DEBUG, "DNS timeout on %08x squished pointer", watch); |