mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 00:55:24 +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:
@@ -2277,12 +2277,8 @@ ns__client_setup(ns_client_t *client, ns_clientmgr_t *mgr, bool new) {
|
||||
ns_server_attach(mgr->sctx, &client->sctx);
|
||||
get_clienttask(mgr, &client->task);
|
||||
|
||||
result = dns_message_create(client->mctx,
|
||||
DNS_MESSAGE_INTENTPARSE,
|
||||
&client->message);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
dns_message_create(client->mctx, DNS_MESSAGE_INTENTPARSE,
|
||||
&client->message);
|
||||
|
||||
client->sendbuf = isc_mem_get(client->mctx,
|
||||
NS_CLIENT_SEND_BUFFER_SIZE);
|
||||
|
Reference in New Issue
Block a user