Commit 80b55d25 authored by Ondřej Surý's avatar Ondřej Surý

libdns: Remove useless checks for ISC_R_MEMORY, which cannot happen now

parent 5f584310
......@@ -885,21 +885,12 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
* Otherwise, get some resource for copying the
* result.
*/
dns_name_t *aname = dns_fixedname_name(&rctx->name);
ansname = isc_mem_get(mctx, sizeof(*ansname));
if (ansname == NULL)
tresult = ISC_R_NOMEMORY;
else {
dns_name_t *aname;
aname = dns_fixedname_name(&rctx->name);
dns_name_init(ansname, NULL);
tresult = dns_name_dup(aname, mctx, ansname);
if (tresult != ISC_R_SUCCESS)
isc_mem_put(mctx, ansname,
sizeof(*ansname));
}
if (tresult != ISC_R_SUCCESS)
result = tresult;
dns_name_init(ansname, NULL);
(void)dns_name_dup(aname, mctx, ansname);
}
switch (result) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment