From: Otto Date: Tue, 4 Jan 2022 13:22:22 +0000 (+0100) Subject: Answer can be nullptr, so test for it to avoid null deref. X-Git-Tag: rec-4.8.0-alpha1~31^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=647e83a5b0e31eca32afa19be6d36d045f12647d;p=thirdparty%2Fpdns.git Answer can be nullptr, so test for it to avoid null deref. --- diff --git a/pdns/distributor.hh b/pdns/distributor.hh index 92b96b36ee..bba617cbca 100644 --- a/pdns/distributor.hh +++ b/pdns/distributor.hh @@ -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; }