mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Address use before NULL check warning of obj
move deference of obj to after NULL check
This commit is contained in:
@@ -2247,12 +2247,14 @@ cleanup:
|
||||
|
||||
void
|
||||
cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) {
|
||||
const cfg_list_t *list = &obj->value.list;
|
||||
const cfg_listelt_t *elt;
|
||||
const cfg_list_t *list = NULL;
|
||||
const cfg_listelt_t *elt = NULL;
|
||||
|
||||
REQUIRE(pctx != NULL);
|
||||
REQUIRE(obj != NULL);
|
||||
|
||||
list = &obj->value.list;
|
||||
|
||||
for (elt = ISC_LIST_HEAD(*list); elt != NULL;
|
||||
elt = ISC_LIST_NEXT(elt, link)) {
|
||||
cfg_print_obj(pctx, elt->obj);
|
||||
|
Reference in New Issue
Block a user