util: null-out the node's prev/next pointers in list_del()
authorChris Fester <camaronut@gmail.com>
Thu, 11 Oct 2012 22:01:23 +0000 (16:01 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 15 Oct 2012 13:49:14 +0000 (07:49 -0600)
Note: This is a candidate for the 9.0 branch.
Signed-off-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_double_list.h

index 9d1129b185d53c330f918eb769e234077e6ae83a..408c26dfc7f88a2401f41ba2bd3ea7383c5fb496 100644 (file)
@@ -82,6 +82,7 @@ static INLINE void list_del(struct list_head *item)
 {
     item->prev->next = item->next;
     item->next->prev = item->prev;
+    item->prev = item->next = NULL;
 }
 
 static INLINE void list_delinit(struct list_head *item)