2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

dns_name_dupwithoffsets() cannot fail

this function now always returns success; change it to void and
clean up its callers.
This commit is contained in:
Evan Hunt
2024-03-12 14:38:18 -07:00
parent 480126919a
commit 2c88946590
6 changed files with 8 additions and 26 deletions

View File

@@ -3856,7 +3856,6 @@ dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *origin,
unsigned int argc, char *argv[],
void *driverarg ISC_ATTR_UNUSED, dns_db_t **dbp) {
dns_qpdb_t *qpdb = NULL;
isc_result_t result;
isc_mem_t *hmctx = mctx;
int i;
@@ -3951,11 +3950,7 @@ dns__qpcache_create(isc_mem_t *mctx, const dns_name_t *origin,
/*
* Make a copy of the origin name.
*/
result = dns_name_dupwithoffsets(origin, mctx, &qpdb->common.origin);
if (result != ISC_R_SUCCESS) {
free_qpdb(qpdb, false);
return (result);
}
dns_name_dupwithoffsets(origin, mctx, &qpdb->common.origin);
/*
* Make the qp tries.