mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Initialize the DST subsystem implicitly
Instead of calling dst_lib_init() and dst_lib_destroy() explicitly by all the programs, create a separate memory context for the DST subsystem and use the library constructor and destructor to initialize the DST internals.
This commit is contained in:
@@ -593,7 +593,6 @@ main(int argc, char **argv) {
|
||||
const char *conffile = NULL;
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
bool cleanup_dst = false;
|
||||
bool load_zones = false;
|
||||
bool list_zones = false;
|
||||
bool print = false;
|
||||
@@ -728,9 +727,6 @@ main(int argc, char **argv) {
|
||||
|
||||
CHECK(setup_logging(mctx, stdout, &logc));
|
||||
|
||||
CHECK(dst_lib_init(mctx));
|
||||
cleanup_dst = true;
|
||||
|
||||
CHECK(cfg_parser_create(mctx, logc, &parser));
|
||||
|
||||
if (nodeprecate) {
|
||||
@@ -757,10 +753,6 @@ cleanup:
|
||||
cfg_parser_destroy(&parser);
|
||||
}
|
||||
|
||||
if (cleanup_dst) {
|
||||
dst_lib_destroy();
|
||||
}
|
||||
|
||||
if (logc != NULL) {
|
||||
isc_log_destroy(&logc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user