From: Mathieu Desnoyers Date: Fri, 1 Jul 2011 21:06:16 +0000 (-0400) Subject: RCU lf queue: Add assert for memory allocation X-Git-Tag: v0.6.5~67 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8f03ed0d5f238075858fdc6a9c64eb4327a39530;p=urcu.git RCU lf queue: Add assert for memory allocation Signed-off-by: Mathieu Desnoyers --- 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);