summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dns.cpp7
-rw-r--r--src/users.cpp4
2 files changed, 8 insertions, 3 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);
diff --git a/src/users.cpp b/src/users.cpp
index c666fd7bd..796893be6 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -282,8 +282,8 @@ userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance)
for (unsigned int n = 0; n < MAXCHANS; n++)
{
chans[n] = new ucrec();
- x->channel = NULL;
- x->uc_modes = 0;
+ chans[n]->channel = NULL;
+ chans[n]->uc_modes = 0;
}
}