* 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) {