]> git.ipfire.org Git - thirdparty/bind9.git/commit
Remove 'inst != NULL' from cleanup check in plugin_register
authorMark Andrews <marka@isc.org>
Tue, 4 Apr 2023 01:01:36 +0000 (11:01 +1000)
committerMark Andrews <marka@isc.org>
Wed, 5 Apr 2023 00:27:52 +0000 (10:27 +1000)
commitbb705e9a905b525e4c5967e131c5b9b8eabdc1d8
tree58b5c8c8d27d78740b3e874f6109be6e249f5ca2
parent09e0c5f14a494001b1ecbe3c205add7a012696f7
Remove 'inst != NULL' from cleanup check in plugin_register

'inst' is guarenteed to be non NULL at this point.

    358        *instp = inst;
    359
    360cleanup:

    CID 281450 (#2 of 2): 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.
    361        if (result != ISC_R_SUCCESS && inst != NULL) {
    362                plugin_destroy((void **)&inst);
    363        }
    364
    365        return (result);

(cherry picked from commit 8c5539e905aec0e91e0bb1b390be8edb2e558c11)
bin/plugins/filter-a.c
bin/plugins/filter-aaaa.c