From 17787004f196f92ea8e5e47ef5852a906491ee1d Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 13 May 2015 00:45:19 +0200 Subject: core_dns Only clear the slot of the request if the object in the slot matches what was passed to MyManager::RemoveRequest() --- src/coremods/core_dns.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 5493470ae..6652841d0 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -471,7 +471,8 @@ class MyManager : public Manager, public Timer, public EventHandler void RemoveRequest(DNS::Request* req) { - this->requests[req->id] = NULL; + if (requests[req->id] == req) + requests[req->id] = NULL; } std::string GetErrorStr(Error e) -- cgit v1.2.3