]> 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:28 +0000 (14:23 +1100)
lib/isc/include/isc/list.h

index 4056be257f3cfd9935722e70c9ae98866227fbda..7c8efbdc77dc939accd76db7c4bb4bf3bd3d3dc7 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) \