]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove unnecessary NULL pointer check
authorMark Andrews <marka@isc.org>
Mon, 2 May 2022 02:12:36 +0000 (12:12 +1000)
committerMark Andrews <marka@isc.org>
Mon, 2 May 2022 13:39:25 +0000 (13:39 +0000)
    3034                next = ISC_LIST_NEXT(query, link);
    3035        } else {
    3036                next = NULL;
    3037        }

    CID 352554 (#1 of 1): Dereference before null check (REVERSE_INULL)
    check_after_deref: Null-checking connectquery suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    3038        if (connectquery != NULL) {
    3039                query_detach(&connectquery);
    3040        }

bin/dig/dighost.c

index 7bbd4fafd20e632101728074f6ca8ee0311fe50f..1c58c4b88e47ed4aa24efe9a17764ed5a5809733 100644 (file)
@@ -3035,9 +3035,7 @@ failure_tls:
        } else {
                next = NULL;
        }
-       if (connectquery != NULL) {
-               query_detach(&connectquery);
-       }
+       query_detach(&connectquery);
        query_detach(&query);
        if (next == NULL) {
                clear_current_lookup();