From 8f03ed0d5f238075858fdc6a9c64eb4327a39530 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 1 Jul 2011 17:06:16 -0400 Subject: [PATCH] RCU lf queue: Add assert for memory allocation Signed-off-by: Mathieu Desnoyers --- urcu/static/rculfqueue.h | 1 + 1 file changed, 1 insertion(+) diff --git a/urcu/static/rculfqueue.h b/urcu/static/rculfqueue.h index b83862f..0b83bc3 100644 --- a/urcu/static/rculfqueue.h +++ b/urcu/static/rculfqueue.h @@ -79,6 +79,7 @@ struct cds_lfq_node_rcu *make_dummy(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu_dummy *dummy; dummy = malloc(sizeof(struct cds_lfq_node_rcu_dummy)); + assert(dummy); dummy->parent.next = next; dummy->q = q; return (struct cds_lfq_node_rcu *) (((unsigned long) &dummy->parent) | 0x1UL); -- 2.34.1