Silence CID 281450: Dereference before null check

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        }
This commit is contained in:
Mark Andrews
2021-02-16 16:15:25 +11:00
parent 441aadab6c
commit 5fb168fab3

View 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);
}