From: Mark Andrews Date: Thu, 30 Jan 2020 08:54:27 +0000 (+1100) Subject: isc_mem_get cannot fail X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9fa5d5a9a6d574daa0b14706cdb3d3ee6c85175;p=thirdparty%2Fbind9.git isc_mem_get cannot fail --- diff --git a/lib/dns/client.c b/lib/dns/client.c index 263ad00b975..4782bd261a7 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -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);