]> granicus.if.org Git - pdns/commitdiff
Do not delete b too early
authorAki Tuomi <cmouse@desteem.org>
Fri, 13 Feb 2015 10:07:57 +0000 (12:07 +0200)
committerAki Tuomi <cmouse@desteem.org>
Fri, 13 Feb 2015 10:08:11 +0000 (12:08 +0200)
pdns/distributor.hh

index cf8e56d8bfb0bed273ffb98918de4e26b0a5c8bb..3c8fbe3f68df61d755bfbefa14ea880ac7de5550 100644 (file)
@@ -234,7 +234,6 @@ template<class Answer, class Question, class Backend>void *MultiThreadDistributo
       }
       catch(const PDNSException &e) {
         L<<Logger::Error<<"Backend error: "<<e.reason<<endl;
-        delete b;
         a=q->replyPacket();
         a->setRcode(RCode::ServFail);
         S.inc("servfail-packets");
@@ -242,7 +241,6 @@ template<class Answer, class Question, class Backend>void *MultiThreadDistributo
       }
       catch(...) {
         L<<Logger::Error<<Logger::NTLog<<"Caught unknown exception in Distributor thread "<<(unsigned long)pthread_self()<<endl;
-        delete b;
         a=q->replyPacket();
         a->setRcode(RCode::ServFail);
         S.inc("servfail-packets");