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

2958. [bug] When canceling validation it was possible to leak

memory. [RT #20800]
This commit is contained in:
Mark Andrews
2010-03-04 22:25:31 +00:00
parent 017032bb4b
commit 22c4126ba5
3 changed files with 18 additions and 23 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.418 2010/03/04 06:43:21 marka Exp $ */
/* $Id: resolver.c,v 1.419 2010/03/04 22:25:31 marka Exp $ */
/*! \file */
@@ -484,7 +484,7 @@ valcreate(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo, dns_name_t *name,
inc_stats(fctx->res, dns_resstatscounter_val);
if ((valoptions & DNS_VALIDATOR_DEFER) == 0) {
INSIST(fctx->validator == NULL);
fctx->validator = validator;
fctx->validator = validator;
}
ISC_LIST_APPEND(fctx->validators, validator, link);
} else
@@ -3911,14 +3911,6 @@ maybe_destroy(fetchctx_t *fctx) {
validator != NULL; validator = next_validator) {
next_validator = ISC_LIST_NEXT(validator, link);
dns_validator_cancel(validator);
/*
* If this is a active validator wait for the cancel
* to complete before calling dns_validator_destroy().
*/
if (validator == fctx->validator)
continue;
ISC_LIST_UNLINK(fctx->validators, validator, link);
dns_validator_destroy(&validator);
}
bucketnum = fctx->bucketnum;