From: Remi Gacogne Date: Tue, 20 Jan 2026 11:32:35 +0000 (+0100) Subject: dnsdist: Prevent copies while logging X-Git-Tag: rec-5.4.0-beta1~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16746%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Prevent copies while logging Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-dnsquestion.cc b/pdns/dnsdistdist/dnsdist-dnsquestion.cc index cf7e7c656f..21b2521082 100644 --- a/pdns/dnsdistdist/dnsdist-dnsquestion.cc +++ b/pdns/dnsdistdist/dnsdist-dnsquestion.cc @@ -65,7 +65,7 @@ std::shared_ptr DNSQuestion::getThisLogger(std::shared_ptr DNSResponse::getThisLogger(std::shared_ptr parent) const @@ -73,7 +73,7 @@ std::shared_ptr DNSResponse::getThisLogger(std::shared_ptr= sizeof(dnsheader)) { const auto header = getHeader(); logger = logger->withValues("dns.response.rcode", Logging::Loggable(RCode::to_s(header->rcode))); @@ -88,7 +88,7 @@ std::shared_ptr DNSResponse::getThisLogger(std::shared_ptr DNSQuestion::getLogger(std::shared_ptr parent) const { - return getThisLogger(parent); + return getThisLogger(std::move(parent)); } std::shared_ptr DNSQuestion::getLogger(std::shared_ptr parent) @@ -96,6 +96,6 @@ std::shared_ptr DNSQuestion::getLogger(std::shared_ptr