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)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Sun, 20 Jan 2013 14:08:26 +0000 (15:08 +0100)
Note: This is a candidate for the 9.0 branch.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 3fffe8f7b77938fcbf449a7f9a2ae9614c8e2bd4)

src/gallium/auxiliary/util/u_double_list.h

index 9d1129b..408c26d 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)