2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Cleanup redundant isc_rwlock_init() result checks

This commit is contained in:
Mark Andrews
2021-02-01 15:59:41 +11:00
parent 48a89e5fbe
commit 3b11bacbb7
14 changed files with 49 additions and 204 deletions

View File

@@ -51,11 +51,7 @@ dns_fwdtable_create(isc_mem_t *mctx, dns_fwdtable_t **fwdtablep) {
goto cleanup_fwdtable;
}
result = isc_rwlock_init(&fwdtable->rwlock, 0, 0);
if (result != ISC_R_SUCCESS) {
goto cleanup_rbt;
}
isc_rwlock_init(&fwdtable->rwlock, 0, 0);
fwdtable->mctx = NULL;
isc_mem_attach(mctx, &fwdtable->mctx);
fwdtable->magic = FWDTABLEMAGIC;
@@ -63,9 +59,6 @@ dns_fwdtable_create(isc_mem_t *mctx, dns_fwdtable_t **fwdtablep) {
return (ISC_R_SUCCESS);
cleanup_rbt:
dns_rbt_destroy(&fwdtable->table);
cleanup_fwdtable:
isc_mem_put(mctx, fwdtable, sizeof(dns_fwdtable_t));