From: Mathieu Desnoyers Date: Mon, 1 Mar 2010 20:15:19 +0000 (-0500) Subject: LFQ: Fix unpaired lock/unlock X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=refs%2Fheads%2Flflist;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);