From: Mathieu Desnoyers Date: Mon, 1 Mar 2010 20:15:19 +0000 (-0500) Subject: LFQ: Fix unpaired lock/unlock X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=40fe3866141aa4e675b3ad1d1a6743588c881aef;p=userspace-rcu.git LFQ: Fix unpaired lock/unlock Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/test_urcu_lfq.c b/tests/test_urcu_lfq.c index 90587b7..9560c74 100644 --- a/tests/test_urcu_lfq.c +++ b/tests/test_urcu_lfq.c @@ -333,8 +333,10 @@ void *dequeue(struct queue *q, bool *not_empty) if (head == tail) { /* If all three are consistent, the queue is empty. */ - if (!next) + if (!next) { + rcu_read_unlock(); return NULL; + } /* Help moving tail further. */ uatomic_cmpxchg(&q->tail, tail, next);