From: Remi Gacogne Date: Fri, 28 Jun 2019 13:21:12 +0000 (+0200) Subject: auth: Fix a leak on 'Backend reported permanent error which prevented lookup' error X-Git-Tag: dnsdist-1.4.0-rc1~76^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8006%2Fhead;p=thirdparty%2Fpdns.git auth: Fix a leak on 'Backend reported permanent error which prevented lookup' error --- diff --git a/pdns/distributor.hh b/pdns/distributor.hh index ecc1509cd4..9efb928aff 100644 --- a/pdns/distributor.hh +++ b/pdns/distributor.hh @@ -193,7 +193,7 @@ templatevoid *MultiThreadDistributo if(read(us->d_pipes[ournum].first, &QD, sizeof(QD)) != sizeof(QD)) unixDie("read"); --us->d_queued; - Answer *a; + Answer *a = nullptr; if(queuetimeout && QD->Q->d_dt.udiff()>queuetimeout*1000) { delete QD->Q; @@ -267,7 +267,7 @@ retry: templateint SingleThreadDistributor::question(Question* q, callback_t callback) { - Answer *a; + Answer *a = nullptr; bool allowRetry=true; retry: try { diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 7b1176d88a..fc15f5aad3 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -1100,7 +1100,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) DNSName haveAlias; uint8_t aliasScopeMask; - DNSPacket *r=0; + DNSPacket *r=nullptr; bool noCache=false; #ifdef HAVE_LUA_RECORDS @@ -1559,6 +1559,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) } catch(PDNSException &e) { g_log<