From: Mark Andrews Date: Tue, 16 Feb 2021 05:15:25 +0000 (+1100) Subject: Silence CID 281450: Dereference before null check X-Git-Tag: v9.17.11~33^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fb168fab397eebab6fe4749f52d2254fd825af2;p=thirdparty%2Fbind9.git 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 } --- diff --git a/bin/tests/system/hooks/driver/test-async.c b/bin/tests/system/hooks/driver/test-async.c index 8449c9b1403..f1669e9fe95 100644 --- a/bin/tests/system/hooks/driver/test-async.c +++ b/bin/tests/system/hooks/driver/test-async.c @@ -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); }