]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4833. [bug] isc_event_free should check that the event is not
authorMark Andrews <marka@isc.org>
Wed, 29 Nov 2017 23:31:44 +0000 (10:31 +1100)
committerMark Andrews <marka@isc.org>
Wed, 29 Nov 2017 23:38:46 +0000 (10:38 +1100)
                        linked when called. [RT #46725]

4832.   [bug]           Events were not being removed from zone->rss_events.
                        [RT #46725]

(cherry picked from commit 9ddf7d6c4cb5a99ef21f606cf865fd500d04da87)

CHANGES
lib/dns/zone.c
lib/isc/event.c
lib/isc/task.c

diff --git a/CHANGES b/CHANGES
index 6f2eeb5111f2cae289b93f61fd6d1d3a3532cbd9..cd99ac1cb71d52f5b7c8542af2e855713918d27d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+4833.  [bug]           isc_event_free should check that the event is not
+                       linked when called. [RT #46725]
+
+4832.  [bug]           Events were not being removed from zone->rss_events.
+                       [RT #46725]
+
 4831.  [bug]           Convert the RRSIG expirytime to 64 bits for
                        comparisions in diff.c:resign. [RT #46710]
 
index 004d4e14d4766863f04f8708e4a235d6853ce938..210dbbaabf52b83d6f85327d1015d6d53a3472d4 100644 (file)
@@ -14268,6 +14268,7 @@ receive_secure_serial(isc_task_t *task, isc_event_t *event) {
                LOCK_ZONE(zone);
                INSIST(zone->irefs > 1);
                zone->irefs--;
+               ISC_LIST_UNLINK(zone->rss_events, event, ev_link);
                goto nextevent;
        }
        dns_zone_idetach(&zone);
index af02cfdb6541817c87547f5aa5589a32b0ef7632..a369d7f6cba2f1a0d427135a9e520bd5a487e10d 100644 (file)
@@ -91,6 +91,9 @@ isc_event_free(isc_event_t **eventp) {
        event = *eventp;
        REQUIRE(event != NULL);
 
+       REQUIRE(!ISC_LINK_LINKED(event, ev_link));
+       REQUIRE(!ISC_LINK_LINKED(event, ev_ratelink));
+
        if (event->ev_destroy != NULL)
                (event->ev_destroy)(event);
 
index f37ae87df4818b286e9e2b821231cb62b6130c4e..26ecf44648e6a2b9909a67f8c747dc85054d11db 100644 (file)
@@ -705,6 +705,7 @@ isc__task_purgerange(isc_task_t *task0, void *sender, isc_eventtype_t first,
 
        for (event = HEAD(events); event != NULL; event = next_event) {
                next_event = NEXT(event, ev_link);
+               ISC_LIST_UNLINK(events, event, ev_link);
                isc_event_free(&event);
        }