Skip to content
Snippets Groups Projects
Commit d4816532 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

confio: add checks for empty io.zones

parent 81d84b04
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,9 @@ int conf_io_begin(
// Reset master transaction flags.
if (!child) {
conf()->io.flags = CONF_IO_FACTIVE;
hattrie_clear(conf()->io.zones);
if (conf()->io.zones != NULL) {
hattrie_clear(conf()->io.zones);
}
}
return KNOT_EOK;
......@@ -127,7 +129,9 @@ void conf_io_abort(
// Reset master transaction flags.
if (!child) {
conf()->io.flags = YP_FNONE;
hattrie_clear(conf()->io.zones);
if (conf()->io.zones != NULL) {
hattrie_clear(conf()->io.zones);
}
}
}
......
......@@ -595,7 +595,9 @@ int server_reload(server_t *server)
} else {
// Reset confio reload context.
conf()->io.flags = YP_FNONE;
hattrie_clear(conf()->io.zones);
if (conf()->io.zones != NULL) {
hattrie_clear(conf()->io.zones);
}
}
return KNOT_EOK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment