]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence CID 281450: Dereference before null check
authorMark Andrews <marka@isc.org>
Tue, 16 Feb 2021 05:15:25 +0000 (16:15 +1100)
committerMark Andrews <marka@isc.org>
Tue, 23 Feb 2021 11:58:40 +0000 (11:58 +0000)
remove redundant 'inst != NULL' test

    162cleanup:

    CID 281450 (#1 of 1): Dereference before null check (REVERSE_INULL)
    check_after_deref: Null-checking inst suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    163        if (result != ISC_R_SUCCESS && inst != NULL) {
    164                plugin_destroy((void **)&inst);
    165        }

bin/tests/system/hooks/driver/test-async.c

index 8449c9b14039d29ab6a174b575a763ed420c930e..f1669e9fe956128fc767b06e5fb6f4c3e98fc295 100644 (file)
@@ -160,7 +160,7 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
        return (ISC_R_SUCCESS);
 
 cleanup:
-       if (result != ISC_R_SUCCESS && inst != NULL) {
+       if (result != ISC_R_SUCCESS) {
                plugin_destroy((void **)&inst);
        }