From: Remi Gacogne Date: Tue, 9 Jun 2020 15:19:09 +0000 (+0200) Subject: rec: Don't copy the records when scanning for CNAME loops X-Git-Tag: dnsdist-1.5.0-rc3~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faedff4087bb8a32eae5e1de7d1cedc5d6387511;p=thirdparty%2Fpdns.git rec: Don't copy the records when scanning for CNAME loops --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 27b78cd288..2585187427 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1174,7 +1174,7 @@ void SyncRes::updateValidationStatusInCache(const DNSName &qname, const QType& q static bool scanForCNAMELoop(const DNSName& name, const vector& records) { - for (const auto record: records) { + for (const auto& record: records) { if (record.d_type == QType::CNAME && record.d_place == DNSResourceRecord::ANSWER) { if (name == record.d_name) { return true;