From: Otto Moerbeek Date: Tue, 8 Oct 2024 14:25:24 +0000 (+0200) Subject: oldZone can be nullptr, don't deref just like that X-Git-Tag: rec-5.2.0-alpha1~7^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03ef00ae7a62be40a8f648692e46b32dca595ed2;p=thirdparty%2Fpdns.git oldZone can be nullptr, don't deref just like that --- diff --git a/pdns/recursordist/rec-xfr.cc b/pdns/recursordist/rec-xfr.cc index 1273d5a734..3eb3e8dc65 100644 --- a/pdns/recursordist/rec-xfr.cc +++ b/pdns/recursordist/rec-xfr.cc @@ -338,7 +338,9 @@ bool FWCatZoneXFR::zoneTrackerIteration(const DNSName& zoneName, std::shared_ptr } catch (const std::runtime_error& e) { logger->error(Logr::Warning, e.what(), "Exception during retrieval of delta", "exception", Logging::Loggable("std::runtime_error")); - oldZone->incFailedStats(); + if (oldZone) { + oldZone->incFailedStats(); + } continue; } }