aboutsummaryrefslogtreecommitdiff
path: root/lib/dns/tkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/tkey.c')
-rw-r--r--lib/dns/tkey.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c
index 0b5440a67d80..0012bbff4464 100644
--- a/lib/dns/tkey.c
+++ b/lib/dns/tkey.c
@@ -987,7 +987,7 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
if (nonce != NULL)
isc_buffer_usedregion(nonce, &r);
else {
- r.base = isc_mem_get(msg->mctx, 0);
+ r.base = NULL;
r.length = 0;
}
tkey.error = 0;
@@ -998,9 +998,6 @@ dns_tkey_builddhquery(dns_message_t *msg, dst_key_t *key, dns_name_t *name,
RETERR(buildquery(msg, name, &tkey, ISC_FALSE));
- if (nonce == NULL)
- isc_mem_put(msg->mctx, r.base, 0);
-
RETERR(dns_message_gettemprdata(msg, &rdata));
RETERR(isc_buffer_allocate(msg->mctx, &dynbuf, 1024));
RETERR(dst_key_todns(key, dynbuf));
@@ -1231,12 +1228,10 @@ dns_tkey_processdhresponse(dns_message_t *qmsg, dns_message_t *rmsg,
if (nonce != NULL)
isc_buffer_usedregion(nonce, &r2);
else {
- r2.base = isc_mem_get(rmsg->mctx, 0);
+ r2.base = NULL;
r2.length = 0;
}
RETERR(compute_secret(shared, &r2, &r, &secret));
- if (nonce == NULL)
- isc_mem_put(rmsg->mctx, r2.base, 0);
isc_buffer_usedregion(&secret, &r);
result = dns_tsigkey_create(tkeyname, &rtkey.algorithm,