From: Otto Moerbeek Date: Fri, 1 Apr 2022 10:22:29 +0000 (+0200) Subject: Coverity 1469687: Dereference null return value X-Git-Tag: rec-4.7.0-beta1~22^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d17859b7d460eff5df1434587cdcf65a0f3994c;p=thirdparty%2Fpdns.git Coverity 1469687: Dereference null return value --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 4f581cbc03..c6afdac811 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -988,11 +988,13 @@ void reportAllTypes() ComboAddress getAddr(const DNSRecord& dr, uint16_t defport) { - if(auto addr=getRR(dr)) { - return addr->getCA(defport); + if (auto a = getRR(dr)) { + return a->getCA(defport); } - else - return getRR(dr)->getCA(defport); + else if (auto aaaa = getRR(dr)) { + return aaaa->getCA(defport); + } + return ComboAddress(); } /**