summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2011-02-26 10:30:19 +0000
committerAlan Hourihane <[email protected]>2011-02-26 10:30:19 +0000
commit53fe5b334ee2d373cec861580121f3ece06bdd07 (patch)
tree3b1bb7e31fb94318a81fcbbb332fe3db7abe68f3 /src/gallium/drivers/llvmpipe
parentca8a91ff7eb7e3fb4595763ea71f427b97e426c6 (diff)
Check for out of memory when creating fence
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_fence.c3
1 files changed, 3 insertions, 0 deletions
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);