Skip to content

Commit

Permalink
clang-analyzer: fix null pointer deref
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Dec 11, 2024
1 parent 5089e2c commit c3a20ca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pdns/packethandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -942,10 +942,12 @@ void PacketHandler::addNSEC(DNSPacket& /* p */, std::unique_ptr<DNSPacket>& r, c
DLOG(g_log<<"addNSEC() mode="<<mode<<" auth="<<d_sd.qname<<" target="<<target<<" wildcard="<<wildcard<<endl);

if (d_sd.db == nullptr) {
if(!B.getSOAUncached(d_sd.qname, d_sd)) {
DLOG(g_log<<"Could not get SOA for domain"<<endl);
return;
}
return;
}

if (!B.getSOAUncached(d_sd.qname, d_sd)) {
DLOG(g_log << "Could not get SOA for domain" << endl);
return;
}

DNSName before,after;
Expand Down

0 comments on commit c3a20ca

Please sign in to comment.