]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Answer can be nullptr, so test for it to avoid null deref.
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 4 Jan 2022 13:22:22 +0000 (14:22 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 2 Sep 2022 12:22:48 +0000 (14:22 +0200)
pdns/distributor.hh

index 92b96b36ee9dae128dbc507e8b13b21448ba7ddf..bba617cbcacb9cc24509e93e6d42408d10b1589c 100644 (file)
@@ -249,7 +249,9 @@ retry:
 
       QD->callback(a, QD->start);
 #ifdef ENABLE_GSS_TSIG
-      QD->Q.cleanupGSS(a->d.rcode);
+      if (a != nullptr) {
+        QD->Q.cleanupGSS(a->d.rcode);
+      }
 #endif
       QD.reset();
     }
@@ -313,7 +315,9 @@ retry:
   }
   callback(a, start);
 #ifdef ENABLE_GSS_TSIG
-  q.cleanupGSS(a->d.rcode);
+  if (a != nullptr) {
+    q.cleanupGSS(a->d.rcode);
+  }
 #endif
   return 0;
 }