mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
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);
This commit is contained in:
parent
d3190485b8
commit
8c5539e905
2 changed files with 2 additions and 2 deletions
|
|
@ -358,7 +358,7 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
|
|||
*instp = inst;
|
||||
|
||||
cleanup:
|
||||
if (result != ISC_R_SUCCESS && inst != NULL) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
plugin_destroy((void **)&inst);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
|
|||
*instp = inst;
|
||||
|
||||
cleanup:
|
||||
if (result != ISC_R_SUCCESS && inst != NULL) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
plugin_destroy((void **)&inst);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue