]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence "Use of memory after it is freed" by asserting the head and tail of list...
authorMark Andrews <marka@isc.org>
Thu, 17 Jan 2013 03:15:28 +0000 (14:15 +1100)
committerMark Andrews <marka@isc.org>
Thu, 17 Jan 2013 03:23:39 +0000 (14:23 +1100)
lib/isc/include/isc/list.h

index c9bdfc7ad6bc854c6be4d059b600a6082aa8c562..508f9fe6a0c6a1b7e1466cf4405b663c60cd0257 100644 (file)
                } \
                (elt)->link.prev = (type *)(-1); \
                (elt)->link.next = (type *)(-1); \
+               ISC_INSIST((list).head != (elt)); \
+               ISC_INSIST((list).head != (elt)); \
        } while (0)
 
 #define __ISC_LIST_UNLINKUNSAFE(list, elt, link) \