diff --git a/kernel/clist.c b/kernel/clist.c index b57e3f3..557e2cc 100644 --- a/kernel/clist.c +++ b/kernel/clist.c @@ -1,6 +1,7 @@ /* See the end of this file for copyright and license terms. */ #include +#include void clist_init(struct clist *head) { @@ -30,6 +31,11 @@ void clist_del(struct clist *node) { node->next->prev = node->prev; node->prev->next = node->next; + +# ifdef DEBUG + node->next = NULL; + node->prev = NULL; +# endif } /*