]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3419. [bug] Memory leak on validation cancel. [RT #31869]
authorMark Andrews <marka@isc.org>
Thu, 15 Nov 2012 00:16:28 +0000 (11:16 +1100)
committerMark Andrews <marka@isc.org>
Thu, 15 Nov 2012 00:16:28 +0000 (11:16 +1100)
Squashed commit of the following:

commit 452b07ec7cb31784d90d9c2e45ca708df306302e
Author: Mark Andrews <marka@isc.org>
Date:   Wed Nov 14 23:36:36 2012 +1100

    destroy fetch when canceling validator

CHANGES
lib/dns/validator.c

diff --git a/CHANGES b/CHANGES
index 66b6b950e832c0587bc03a613a5515e06e44f110..7dea6b92fc88a4d44a3b01d94ef88bbe4e9d0924 100644 (file)
--- 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 
index 25424c1e63e5ab3a92385cb1edb2b628260b52a3..f85125a19965669798241d252385df39f4bd61d1 100644 (file)
@@ -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