From 0961618e414b35bd247d08b5ff33d3e2d7f6967e Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 29 Jul 2014 17:21:26 +0300 Subject: [PATCH] shared/queue: Fix not allowing to remove NULL entries queue_remove should not check the data pointer since both queue_push_head and queue_push_tail don't check it is possible to have NULL pointers in the queue therefore queue_remove shall be able to remove them. --- src/shared/queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/queue.c b/src/shared/queue.c index 3bdc1ec4b..3ca3ca68e 100644 --- a/src/shared/queue.c +++ b/src/shared/queue.c @@ -238,7 +238,7 @@ bool queue_remove(struct queue *queue, void *data) { struct queue_entry *entry, *prev; - if (!queue || !data) + if (!queue) return false; for (entry = queue->head, prev = NULL; entry; -- 2.47.3