2
0
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:
Mark Andrews
2021-09-28 10:14:02 +10:00
parent 8fc9bb8e8e
commit 06a69e03ac

View File

@@ -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);