Clear link pointer on dequeue

This commit is contained in:
Tony Garnock-Jones 2011-01-02 11:44:31 -05:00
parent 6d01ea359a
commit e7fa9b1642
1 changed files with 1 additions and 0 deletions

View File

@ -24,6 +24,7 @@ void *dequeue(queue_t *q) {
} else {
void *x = q->head;
q->head = QLINK(q, x);
QLINK(q, x) = NULL;
if (q->head == NULL) {
q->tail = NULL;
}