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:
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user