]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Cleanup left over 'fctx != NULL' test following refactoring
authorMark Andrews <marka@isc.org>
Tue, 21 Feb 2023 02:37:24 +0000 (13:37 +1100)
committerMark Andrews <marka@isc.org>
Tue, 21 Feb 2023 12:22:27 +0000 (12:22 +0000)
This was causing 'CID 436299: Null pointer dereferences (REVERSE_INULL)'
in Coverity.  Also removed an 'INSIST(fctx != NULL);' that should
no longer be needed.

lib/dns/resolver.c

index f6b6f64d102f4c2190c8e16c009044d6bbfd84a4..e043b9a366f7ea1a128b05e93a7dec5943c0d10e 100644 (file)
@@ -10613,11 +10613,10 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name,
                }
 
                /* On success, the fctx is locked in get_attached_fctx() */
-
                INSIST(!SHUTTINGDOWN(fctx));
 
                /* Is this a duplicate? */
-               if (fctx != NULL && client != NULL) {
+               if (client != NULL) {
                        dns_fetchresponse_t *resp = NULL;
                        for (resp = ISC_LIST_HEAD(fctx->resps); resp != NULL;
                             resp = ISC_LIST_NEXT(resp, link))
@@ -10632,7 +10631,6 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name,
                        }
                }
                if (count >= spillatmin && spillatmin != 0) {
-                       INSIST(fctx != NULL);
                        if (count >= spillat) {
                                fctx->spilled = true;
                        }