mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-04 00:25:29 +00:00
Remove unnecessary NULL test leading to REVERSE_INULL false positive
*** CID 351371: Null pointer dereferences (REVERSE_INULL) /lib/dns/adb.c: 2615 in dns_adb_createfind() 2609 /* 2610 * Copy out error flags from the name structure into the find. 2611 */ 2612 find->result_v4 = find_err_map[adbname->fetch_err]; 2613 find->result_v6 = find_err_map[adbname->fetch6_err]; 2614 >>> CID 351371: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "find" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 2615 if (find != NULL) { 2616 if (want_event) { 2617 INSIST((find->flags & DNS_ADBFIND_ADDRESSMASK) != 0); 2618 isc_task_attach(task, &(isc_task_t *){ NULL }); 2619 find->event.ev_sender = task; 2620 find->event.ev_action = action;
This commit is contained in:
@@ -2612,18 +2612,16 @@ post_copy:
|
|||||||
find->result_v4 = find_err_map[adbname->fetch_err];
|
find->result_v4 = find_err_map[adbname->fetch_err];
|
||||||
find->result_v6 = find_err_map[adbname->fetch6_err];
|
find->result_v6 = find_err_map[adbname->fetch6_err];
|
||||||
|
|
||||||
if (find != NULL) {
|
if (want_event) {
|
||||||
if (want_event) {
|
INSIST((find->flags & DNS_ADBFIND_ADDRESSMASK) != 0);
|
||||||
INSIST((find->flags & DNS_ADBFIND_ADDRESSMASK) != 0);
|
isc_task_attach(task, &(isc_task_t *){ NULL });
|
||||||
isc_task_attach(task, &(isc_task_t *){ NULL });
|
find->event.ev_sender = task;
|
||||||
find->event.ev_sender = task;
|
find->event.ev_action = action;
|
||||||
find->event.ev_action = action;
|
find->event.ev_arg = arg;
|
||||||
find->event.ev_arg = arg;
|
|
||||||
}
|
|
||||||
|
|
||||||
*findp = find;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*findp = find;
|
||||||
|
|
||||||
UNLOCK(&nbucket->lock);
|
UNLOCK(&nbucket->lock);
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user