]> granicus.if.org Git - pdns/commitdiff
dnsdist: Check that the ClientState pointer is not nullptr
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 24 Oct 2019 08:41:49 +0000 (10:41 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 24 Oct 2019 08:41:49 +0000 (10:41 +0200)
That makes clang's static analyzer happy.

pdns/dnsdist.cc

index 08d5ceeb283e78c95199c4a48fbe3941a3278e4d..955743971cd4d9b38c84959f418b53d252883280 100644 (file)
@@ -632,7 +632,9 @@ try {
         }
 
         ++g_stats.responses;
-        ++ids->cs->responses;
+        if (ids->cs) {
+          ++ids->cs->responses;
+        }
         ++dss->responses;
 
         double udiff = ids->sentTime.udiff();