mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
1900. [port] freebsd: pthread_mutex_init can fail if it runs out
of memory. [RT #14995]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: forward.c,v 1.9 2005/04/27 04:56:46 sra Exp $ */
|
||||
/* $Id: forward.c,v 1.10 2005/07/12 01:00:15 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -64,13 +64,8 @@ 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) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_rwlock_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
result = ISC_R_UNEXPECTED;
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_rbt;
|
||||
}
|
||||
|
||||
fwdtable->mctx = NULL;
|
||||
isc_mem_attach(mctx, &fwdtable->mctx);
|
||||
|
Reference in New Issue
Block a user