From 53fe5b334ee2d373cec861580121f3ece06bdd07 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Sat, 26 Feb 2011 10:30:19 +0000 Subject: Check for out of memory when creating fence --- src/gallium/drivers/llvmpipe/lp_fence.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c index 3a55e76bc35..a21a3c74484 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.c +++ b/src/gallium/drivers/llvmpipe/lp_fence.c @@ -47,6 +47,9 @@ lp_fence_create(unsigned rank) static int fence_id; struct lp_fence *fence = CALLOC_STRUCT(lp_fence); + if (!fence) + return NULL; + pipe_reference_init(&fence->reference, 1); pipe_mutex_init(fence->mutex); -- cgit v1.2.3