]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
oldZone can be nullptr, don't deref just like that
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 8 Oct 2024 14:25:24 +0000 (16:25 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 4 Nov 2024 14:20:14 +0000 (15:20 +0100)
pdns/recursordist/rec-xfr.cc

index 1273d5a7347a927d7f6b3248ef0d5f52a7adff2f..3eb3e8dc65527a037a77a28fa759fe7e340d0af2 100644 (file)
@@ -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;
     }
   }