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

set the magic number at the end of dns_dt_create()

See merge request isc-projects/bind9!1383
This commit is contained in:
Evan Hunt
2019-01-23 14:12:21 -05:00

View File

@@ -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: