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;
template<class Answer, class Question, class Backend>int SingleThreadDistributor<Answer,Question,Backend>::question(Question* q, callback_t callback)
{
- Answer *a;
+ Answer *a = nullptr;
bool allowRetry=true;
retry:
try {
DNSName haveAlias;
uint8_t aliasScopeMask;
- DNSPacket *r=0;
+ DNSPacket *r=nullptr;
bool noCache=false;
#ifdef HAVE_LUA_RECORDS
}
catch(PDNSException &e) {
g_log<<Logger::Error<<"Backend reported permanent error which prevented lookup ("+e.reason+"), aborting"<<endl;
+ delete r;
throw; // we WANT to die at this point
}
catch(std::exception &e) {