mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +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 */
|
} /* end while */
|
||||||
|
|
||||||
complete_allnds:
|
complete_allnds:
|
||||||
if (dir_list != NULL) {
|
/* clean up entries from list. */
|
||||||
/* clean up entries from list. */
|
dir_entry = ISC_LIST_HEAD(*dir_list);
|
||||||
dir_entry = ISC_LIST_HEAD(*dir_list);
|
while (dir_entry != NULL) {
|
||||||
while (dir_entry != NULL) {
|
next_de = ISC_LIST_NEXT(dir_entry, link);
|
||||||
next_de = ISC_LIST_NEXT(dir_entry, link);
|
isc_mem_put(named_g_mctx, dir_entry, sizeof(dir_entry_t));
|
||||||
isc_mem_put(named_g_mctx, dir_entry, sizeof(dir_entry_t));
|
dir_entry = next_de;
|
||||||
dir_entry = next_de;
|
} /* end while */
|
||||||
} /* end while */
|
isc_mem_put(named_g_mctx, dir_list, sizeof(dlist_t));
|
||||||
isc_mem_put(named_g_mctx, dir_list, sizeof(dlist_t));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (basepath != NULL)
|
if (basepath != NULL) {
|
||||||
isc_mem_free(named_g_mctx, basepath);
|
isc_mem_free(named_g_mctx, basepath);
|
||||||
|
}
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user