2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

2229. [bug] Null pointer dereference on dispatch pool creation

failure. [RT #17133]
This commit is contained in:
Mark Andrews 2007-09-06 10:00:19 +00:00
parent 9ab3b369d9
commit adc3f2c0fd
2 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,6 @@
2229. [bug] Null pointer dereference on dispatch pool creation
failure. [RT #17133]
2228. [contrib] contrib: Change 2188 was incomplete.
2227. [cleanup] Tidied up the FAQ. [RT #17121]

View File

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.350 2007/08/28 01:37:18 marka Exp $ */
/* $Id: resolver.c,v 1.351 2007/09/06 10:00:19 marka Exp $ */
/*! \file */
@ -7490,17 +7490,17 @@ dns_resolver_createdispatchpool(dns_resolver_t *res, unsigned int ndisps,
return (result);
cleanup:
for (i = 0; i < ndisps; i++) {
if (res->dispatchv4pool[i] != NULL)
dns_dispatch_detach(&res->dispatchv4pool[i]);
if (res->dispatchv6pool[i] != NULL)
dns_dispatch_detach(&res->dispatchv6pool[i]);
}
if (res->dispatchv4pool != NULL) {
for (i = 0; i < ndisps; i++)
if (res->dispatchv4pool[i] != NULL)
dns_dispatch_detach(&res->dispatchv4pool[i]);
isc_mem_put(res->mctx, res->dispatchv4pool,
sizeof(dns_dispatch_t *) * ndisps);
}
if (res->dispatchv6pool != NULL) {
for (i = 0; i < ndisps; i++)
if (res->dispatchv6pool[i] != NULL)
dns_dispatch_detach(&res->dispatchv6pool[i]);
isc_mem_put(res->mctx, res->dispatchv6pool,
sizeof(dns_dispatch_t *) * ndisps);
}