diff options
author | 2005-08-21 02:26:22 +0000 | |
---|---|---|
committer | 2005-08-21 02:26:22 +0000 | |
commit | 8beb55afb831a9318f05387ce72278be9d36faeb (patch) | |
tree | d2401db45f34fac982747df5e5c081e1c4b09a87 | |
parent | cac(4) are 234* series and ciss(4) are 56* series. (diff) | |
download | wireguard-openbsd-8beb55afb831a9318f05387ce72278be9d36faeb.tar.xz wireguard-openbsd-8beb55afb831a9318f05387ce72278be9d36faeb.zip |
The patch addresses a problem with high-load resolvers which
hit memory barriers. Without this patch, running the resolving
name server out of memory would lead to "unpredictable results."
From glebius FreeBSD
ok deraadt@ millert@ cloder@ krw@
-rw-r--r-- | usr.sbin/bind/lib/dns/resolver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bind/lib/dns/resolver.c b/usr.sbin/bind/lib/dns/resolver.c index c199c12a542..3644c606c7a 100644 --- a/usr.sbin/bind/lib/dns/resolver.c +++ b/usr.sbin/bind/lib/dns/resolver.c @@ -2665,7 +2665,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, unsigned int options, unsigned int bucketnum, fetchctx_t **fctxp) { fetchctx_t *fctx; - isc_result_t result = ISC_R_SUCCESS; + isc_result_t result; isc_result_t iresult; isc_interval_t interval; dns_fixedname_t qdomain; @@ -2687,8 +2687,10 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type, strlcat(buf, "/", sizeof(buf)); strlcat(buf, typebuf, sizeof(buf)); fctx->info = isc_mem_strdup(res->mctx, buf); - if (fctx->info == NULL) + if (fctx->info == NULL) { + result = ISC_R_NOMEMORY; goto cleanup_fetch; + } FCTXTRACE("create"); dns_name_init(&fctx->name, NULL); result = dns_name_dup(name, res->mctx, &fctx->name); |