diff --git a/queue.c b/queue.c index dcd92d358..5841cb6fb 100644 --- a/queue.c +++ b/queue.c @@ -111,6 +111,7 @@ bool q_delete_mid(struct list_head *head) while (back != forward && back->prev != forward) { forward = forward->next; back = back->prev; + back = back->prev; } list_del(forward); element_t *node = list_entry(forward, element_t, list);