mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
use a fixedname buffer in dns_message_gettempname()
dns_message_gettempname() now returns a pointer to an initialized name associated with a dns_fixedname_t object. it is no longer necessary to allocate a buffer for temporary names associated with the message object.
This commit is contained in:
@@ -760,7 +760,7 @@ dns_tsig_sign(dns_message_t *msg) {
|
||||
unsigned char data[128];
|
||||
isc_buffer_t databuf, sigbuf;
|
||||
isc_buffer_t *dynbuf = NULL;
|
||||
dns_name_t *owner;
|
||||
dns_name_t *owner = NULL;
|
||||
dns_rdata_t *rdata = NULL;
|
||||
dns_rdatalist_t *datalist = NULL;
|
||||
dns_rdataset_t *dataset = NULL;
|
||||
@@ -1016,20 +1016,17 @@ dns_tsig_sign(dns_message_t *msg) {
|
||||
tsig.signature = NULL;
|
||||
}
|
||||
|
||||
owner = NULL;
|
||||
ret = dns_message_gettempname(msg, &owner);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
goto cleanup_rdata;
|
||||
}
|
||||
dns_name_init(owner, NULL);
|
||||
dns_name_dup(&key->name, msg->mctx, owner);
|
||||
dns_name_clone(&key->name, owner);
|
||||
|
||||
datalist = NULL;
|
||||
ret = dns_message_gettemprdatalist(msg, &datalist);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
goto cleanup_owner;
|
||||
}
|
||||
dataset = NULL;
|
||||
|
||||
ret = dns_message_gettemprdataset(msg, &dataset);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
goto cleanup_rdatalist;
|
||||
|
Reference in New Issue
Block a user