mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
The dns_message_create() cannot fail, change the return to void
The dns_message_create() function cannot soft fail (as all memory allocations either succeed or cause abort), so we change the function to return void and cleanup the calls.
This commit is contained in:
@@ -210,8 +210,7 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &response);
|
||||
CHECK("dns_message_create", result);
|
||||
dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &response);
|
||||
|
||||
parseflags |= DNS_MESSAGEPARSE_PRESERVEORDER;
|
||||
if (besteffort) {
|
||||
@@ -594,8 +593,7 @@ sendquery(struct query *query, isc_task_t *task) {
|
||||
CHECK("dns_name_fromtext", result);
|
||||
|
||||
message = NULL;
|
||||
result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &message);
|
||||
CHECK("dns_message_create", result);
|
||||
dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &message);
|
||||
|
||||
message->opcode = dns_opcode_query;
|
||||
if (query->recurse) {
|
||||
|
Reference in New Issue
Block a user