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

index 54e14ce1110182959fc23869397e83707deb363b..263ad00b975cda38ec81e07c197d02315e91450f 100644 (file)
@@ -1340,13 +1340,7 @@ dns_client_startresolve(dns_client_t *client, const dns_name_t *name,
        ISC_LIST_INIT(event->answerlist);
 
        rctx = isc_mem_get(mctx, sizeof(*rctx));
-       if (rctx == NULL)
-               result = ISC_R_NOMEMORY;
-       else {
-               isc_mutex_init(&rctx->lock);
-       }
-       if (result != ISC_R_SUCCESS)
-               goto cleanup;
+       isc_mutex_init(&rctx->lock);
 
        result = getrdataset(mctx, &rdataset);
        if (result != ISC_R_SUCCESS)