Commit 7311ebe9 authored by Evan Hunt's avatar Evan Hunt

Merge branch 'each-set-magic-last' into 'master'

set the magic number at the end of dns_dt_create()

See merge request !1383
parents e6bf898e c29abd30
Pipeline #8976 passed with stages
in 58 seconds
......@@ -211,8 +211,6 @@ dns_dt_create(isc_mem_t *mctx, dns_dtmode_t mode, const char *path,
env = isc_mem_get(mctx, sizeof(dns_dtenv_t));
memset(env, 0, sizeof(dns_dtenv_t));
env->magic = DTENV_MAGIC;
isc_mem_attach(mctx, &env->mctx);
env->reopen_task = reopen_task;
isc_mutex_init(&env->reopen_lock);
env->reopen_queued = false;
......@@ -267,6 +265,9 @@ dns_dt_create(isc_mem_t *mctx, dns_dtmode_t mode, const char *path,
env->fopt = *foptp;
*foptp = NULL;
isc_mem_attach(mctx, &env->mctx);
env->magic = DTENV_MAGIC;
*envp = env;
cleanup:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment