Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . isc-dhcp (4.3.5-3ubuntu7) bionic; urgency=medium . * bind-includes.patch: Copied from Debian to fix build with bind 9.11.3. Author: Timo Aaltonen --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: https://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: 2018-11-08 --- isc-dhcp-4.3.5.orig/server/mdb6.c +++ isc-dhcp-4.3.5/server/mdb6.c @@ -1186,7 +1186,7 @@ cleanup_lease6(ia_hash_t *ia_table, * Remove the old lease from the active heap and from the hash table * then remove the lease from the IA and clean up the IA if necessary. */ - isc_heap_delete(pool->active_timeouts, test_iasubopt->heap_index); + if (test_iasubopt->heap_index > 0) isc_heap_delete(pool->active_timeouts, test_iasubopt->heap_index); pool->num_active--; if (pool->ipv6_pond) pool->ipv6_pond->num_active--; @@ -1258,7 +1258,7 @@ add_lease6(struct ipv6_pool *pool, struc */ if ((test_iasubopt->state == FTS_ACTIVE) || (test_iasubopt->state == FTS_ABANDONED)) { - isc_heap_delete(pool->active_timeouts, + if (test_iasubopt->heap_index > 0) isc_heap_delete(pool->active_timeouts, test_iasubopt->heap_index); pool->num_active--; if (pool->ipv6_pond) @@ -1270,7 +1270,7 @@ add_lease6(struct ipv6_pool *pool, struc pool->ipv6_pond->num_abandoned--; } } else { - isc_heap_delete(pool->inactive_timeouts, + if (test_iasubopt->heap_index > 0) isc_heap_delete(pool->inactive_timeouts, test_iasubopt->heap_index); pool->num_inactive--; } @@ -1399,7 +1399,7 @@ move_lease_to_active(struct ipv6_pool *p if (insert_result == ISC_R_SUCCESS) { iasubopt_hash_add(pool->leases, &lease->addr, sizeof(lease->addr), lease, MDL); - isc_heap_delete(pool->inactive_timeouts, old_heap_index); + if (old_heap_index > 0) isc_heap_delete(pool->inactive_timeouts, old_heap_index); pool->num_active++; pool->num_inactive--; lease->state = FTS_ACTIVE; @@ -1533,7 +1533,7 @@ move_lease_to_inactive(struct ipv6_pool iasubopt_hash_delete(pool->leases, &lease->addr, sizeof(lease->addr), MDL); - isc_heap_delete(pool->active_timeouts, old_heap_index); + if (old_heap_index > 0) isc_heap_delete(pool->active_timeouts, old_heap_index); lease->state = state; pool->num_active--; pool->num_inactive++; @@ -1884,7 +1884,7 @@ cleanup_old_expired(struct ipv6_pool *po break; } - isc_heap_delete(pool->inactive_timeouts, tmp->heap_index); + if (tmp->heap_index > 0) isc_heap_delete(pool->inactive_timeouts, tmp->heap_index); pool->num_inactive--; if (tmp->ia != NULL) {