]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add comment
authorMark Andrews <marka@isc.org>
Tue, 8 Aug 2017 23:51:59 +0000 (09:51 +1000)
committerMukund Sivaraman <muks@isc.org>
Wed, 9 Aug 2017 03:12:10 +0000 (08:42 +0530)
lib/dns/resolver.c

index a00c395db661d4df629b05d0b82031fd51d02c90..8d3df4ecc7519a62229e7ca8e987b4c8fcc29a55 100644 (file)
@@ -6653,6 +6653,14 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
        dns_rdataset_init(&nameservers);
 
        bucketnum = fctx->bucketnum;
+
+       /*
+        * Note: fevent->rdataset must be disassociated and
+        * isc_event_free(&event) be called before resuming
+        * processing of the 'fctx' to prevent use-after-free.
+        * 'fevent' is set to NULL so as to not have a dangling
+        * pointer.
+        */
        if (fevent->result == ISC_R_CANCELED) {
                if (dns_rdataset_isassociated(fevent->rdataset)) {
                        dns_rdataset_disassociate(fevent->rdataset);