Module: Mesa Branch: 7.10 Commit: c13a7748def6885aea35102fe74ae33abcd9212a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c13a7748def6885aea35102fe74ae33abcd9212a
Author: Alan Hourihane <[email protected]> Date: Sat Feb 26 10:30:19 2011 +0000 Check for out of memory when creating fence --- src/gallium/drivers/llvmpipe/lp_fence.c | 3 +++ 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 3a55e76..a21a3c7 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); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
