]> 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>
Tue, 3 Mar 2015 13:47:30 +0000 (15:47 +0200)
pdns/distributor.hh

index 184480f7f07cb0a88d9ceb1e729eca186d331e6e..301d5701975d0590d21bacf5d8d58d2822d8c753 100644 (file)
@@ -240,7 +240,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");
@@ -248,7 +247,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");