From 5fb168fab397eebab6fe4749f52d2254fd825af2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 16 Feb 2021 16:15:25 +1100 Subject: [PATCH] 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 } --- bin/tests/system/hooks/driver/test-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/hooks/driver/test-async.c b/bin/tests/system/hooks/driver/test-async.c index 8449c9b140..f1669e9fe9 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); }