mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
'dir_list' must be non NULL, remove test.
707 complete_allnds: CID 1452689 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking dir_list suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 708 if (dir_list != NULL) { 709 /* clean up entries from list. */
This commit is contained in:
@@ -688,19 +688,18 @@ fs_allnodes(const char *zone, void *driverarg, void *dbdata,
|
||||
} /* end while */
|
||||
|
||||
complete_allnds:
|
||||
if (dir_list != NULL) {
|
||||
/* clean up entries from list. */
|
||||
dir_entry = ISC_LIST_HEAD(*dir_list);
|
||||
while (dir_entry != NULL) {
|
||||
next_de = ISC_LIST_NEXT(dir_entry, link);
|
||||
isc_mem_put(named_g_mctx, dir_entry, sizeof(dir_entry_t));
|
||||
dir_entry = next_de;
|
||||
} /* end while */
|
||||
isc_mem_put(named_g_mctx, dir_list, sizeof(dlist_t));
|
||||
}
|
||||
/* clean up entries from list. */
|
||||
dir_entry = ISC_LIST_HEAD(*dir_list);
|
||||
while (dir_entry != NULL) {
|
||||
next_de = ISC_LIST_NEXT(dir_entry, link);
|
||||
isc_mem_put(named_g_mctx, dir_entry, sizeof(dir_entry_t));
|
||||
dir_entry = next_de;
|
||||
} /* end while */
|
||||
isc_mem_put(named_g_mctx, dir_list, sizeof(dlist_t));
|
||||
|
||||
if (basepath != NULL)
|
||||
if (basepath != NULL) {
|
||||
isc_mem_free(named_g_mctx, basepath);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user