From: Mark Andrews Date: Thu, 15 Nov 2012 00:16:28 +0000 (+1100) Subject: 3419. [bug] Memory leak on validation cancel. [RT #31869] X-Git-Tag: v9.10.0a1~719 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=39bfdc2ff9da3c2ecdbc70d46cabfd56d66f24f6;p=thirdparty%2Fbind9.git 3419. [bug] Memory leak on validation cancel. [RT #31869] Squashed commit of the following: commit 452b07ec7cb31784d90d9c2e45ca708df306302e Author: Mark Andrews Date: Wed Nov 14 23:36:36 2012 +1100 destroy fetch when canceling validator --- diff --git a/CHANGES b/CHANGES index 66b6b950e83..7dea6b92fc8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3419. [bug] Memory leak on validation cancel. [RT #31869] + 3418. [func] New XML schema (version 3.0) for the statistics channel adds query type statistics at the zone level, and flattens the XML tree and uses compressed format to diff --git a/lib/dns/validator.c b/lib/dns/validator.c index 25424c1e63e..f85125a1996 100644 --- a/lib/dns/validator.c +++ b/lib/dns/validator.c @@ -4273,9 +4273,11 @@ dns_validator_cancel(dns_validator_t *validator) { } UNLOCK(&validator->lock); - /* Need to cancel fetch outside validator lock */ - if (fetch != NULL) + /* Need to cancel and destroy the fetch outside validator lock */ + if (fetch != NULL) { dns_resolver_cancelfetch(fetch); + dns_resolver_destroyfetch(&fetch); + } } static void