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

1900. [port] freebsd: pthread_mutex_init can fail if it runs out

of memory. [RT #14995]
This commit is contained in:
Mark Andrews
2005-07-12 01:00:20 +00:00
parent 0563d476de
commit 18d0b5e54b
33 changed files with 376 additions and 380 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acl.c,v 1.27 2005/04/29 00:22:43 marka Exp $ */
/* $Id: acl.c,v 1.28 2005/07/12 01:00:14 marka Exp $ */
/*! \file */
@@ -43,7 +43,11 @@ dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target) {
return (ISC_R_NOMEMORY);
acl->mctx = mctx;
acl->name = NULL;
isc_refcount_init(&acl->refcount, 1);
result = isc_refcount_init(&acl->refcount, 1);
if (result != ISC_R_SUCCESS) {
isc_mem_put(mctx, acl, sizeof(*acl));
return (result);
}
acl->elements = NULL;
acl->alloc = 0;
acl->length = 0;