2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Silence CID 304936 Dereference before null check

Removed redundant 'listener != NULL' check.

    1191cleanup:

    CID 304936 (#1 of 1): Dereference before null check (REVERSE_INULL)
    check_after_deref: Null-checking listener suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    1192        if (listener != NULL) {
    1193                isc_refcount_decrement(&listener->refs);
    1194                listener->exiting = true;
    1195                free_listener(listener);
    1196        }
This commit is contained in:
Mark Andrews
2021-02-16 16:05:56 +11:00
parent 5cadcff801
commit c4906be2d4

View File

@@ -1189,11 +1189,9 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
return;
cleanup:
if (listener != NULL) {
isc_refcount_decrement(&listener->refs);
listener->exiting = true;
free_listener(listener);
}
isc_refcount_decrement(&listener->refs);
listener->exiting = true;
free_listener(listener);
if (control != NULL) {
cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,