]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
isc_mem_get cannot fail
authorMark Andrews <marka@isc.org>
Thu, 30 Jan 2020 08:54:27 +0000 (19:54 +1100)
committerMark Andrews <marka@isc.org>
Thu, 30 Jan 2020 08:54:27 +0000 (19:54 +1100)
lib/dns/client.c

index 263ad00b975cda38ec81e07c197d02315e91450f..4782bd261a7ac6938f4b2c4af9aef978d77b61bb 100644 (file)
@@ -1742,13 +1742,7 @@ dns_client_startrequest(dns_client_t *client, dns_message_t *qmessage,
                                   action, arg, sizeof(*event));
 
        ctx = isc_mem_get(client->mctx, sizeof(*ctx));
-       if (ctx == NULL)
-               result = ISC_R_NOMEMORY;
-       else {
-               isc_mutex_init(&ctx->lock);
-       }
-       if (result != ISC_R_SUCCESS)
-               goto cleanup;
+       isc_mutex_init(&ctx->lock);
 
        ctx->client = client;
        ISC_LINK_INIT(ctx, link);