projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dfb43c
)
llvmpipe: fail cleanly on malloc failure in lp_setup_alloc_triangle
author
Keith Whitwell
<keithw@vmware.com>
Mon, 18 Oct 2010 01:48:11 +0000
(18:48 -0700)
committer
Keith Whitwell
<keithw@vmware.com>
Mon, 18 Oct 2010 01:48:11 +0000
(18:48 -0700)
src/gallium/drivers/llvmpipe/lp_setup_tri.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index c6cb9afda47a5356b4ab941a2c918443bd569ab5..15c414d8c3b654860a82ed6990340c3c4b3713a7 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/
src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@
-86,9
+86,10
@@
lp_setup_alloc_triangle(struct lp_scene *scene,
plane_sz);
tri = lp_scene_alloc_aligned( scene, *tri_size, 16 );
- if (tri) {
- tri->inputs.stride = input_array_sz;
- }
+ if (tri == NULL)
+ return NULL;
+
+ tri->inputs.stride = input_array_sz;
{
char *a = (char *)tri;
@@
-96,7
+97,6
@@
lp_setup_alloc_triangle(struct lp_scene *scene,
assert(b - a == *tri_size);
}
-
return tri;
}