mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
2037. [func] When unlinking the first or last element in a list
check that the list head points to the element to
be unlinked. [RT #15959]
This commit is contained in:
parent
5d51f53483
commit
d48f987725
2 changed files with 10 additions and 2 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
2037. [func] When unlinking the first or last element in a list
|
||||
check that the list head points to the element to
|
||||
be unlinked. [RT #15959]
|
||||
|
||||
2036. [bug] 'rndc recursing' could cause trigger a REQUIRE.
|
||||
[RT #16075]
|
||||
|
||||
|
|
|
|||
|
|
@ -66,12 +66,16 @@
|
|||
INSIST(LINKED(elt, link));\
|
||||
if ((elt)->link.next != NULL) \
|
||||
(elt)->link.next->link.prev = (elt)->link.prev; \
|
||||
else \
|
||||
else { \
|
||||
INSIST((list).tail == (elt)); \
|
||||
(list).tail = (elt)->link.prev; \
|
||||
} \
|
||||
if ((elt)->link.prev != NULL) \
|
||||
(elt)->link.prev->link.next = (elt)->link.next; \
|
||||
else \
|
||||
else { \
|
||||
INSIST((list).head == (elt)); \
|
||||
(list).head = (elt)->link.next; \
|
||||
} \
|
||||
INIT_LINK_TYPE(elt, link, type); \
|
||||
} while (0)
|
||||
#define UNLINK(list, elt, link) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue