summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-08-24 13:43:19 +0200
committerSamuel Pitoiset <[email protected]>2017-08-25 11:11:44 +0200
commit41c7c2d968961e1cca2d5308f3066b2b840be68b (patch)
tree2c048f18be6cf35524ac5fbc410411d5a6970b3c /src/mesa/main
parentdd53bdd5aa6e8d858da5dbc24346f6d6f4ccab47 (diff)
mesa: check allocation failures in new_transform_feedback()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/transformfeedback.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 9ffbfe7e6c6..e30448ea4f6 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -207,7 +207,11 @@ static struct gl_transform_feedback_object *
new_transform_feedback(struct gl_context *ctx, GLuint name)
{
struct gl_transform_feedback_object *obj;
+
obj = CALLOC_STRUCT(gl_transform_feedback_object);
+ if (!obj)
+ return NULL;
+
_mesa_init_transform_feedback_object(obj, name);
return obj;
}