From: Evan Hunt Date: Wed, 23 Jan 2019 18:48:25 +0000 (-0800) Subject: set the magic number at the end of dns_dt_create() X-Git-Tag: v9.13.6~42^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c29abd307c9db745d292f2ca1204edf6414d6a30;p=thirdparty%2Fbind9.git set the magic number at the end of dns_dt_create() --- diff --git a/lib/dns/dnstap.c b/lib/dns/dnstap.c index 2b535b8e068..bf312ed6feb 100644 --- a/lib/dns/dnstap.c +++ b/lib/dns/dnstap.c @@ -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: