summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-07-13 16:29:25 +0100
committerLionel Landwerlin <[email protected]>2017-07-13 22:50:41 +0100
commit7c4daf8c3759fae9e1ef1e088866680b8574755c (patch)
tree54ced2142e56576d71ed7b61c07160ac26d7640f /src/mesa
parent95c917668ca887432b8a7a299555c6c2ca449e04 (diff)
i965: fix missing NULL return if allocation fails
CID: 1250585 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_buffer_objects.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index 85cc1a694bf..fde6b224cd4 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -99,6 +99,7 @@ brw_new_buffer_object(struct gl_context * ctx, GLuint name)
struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
if (!obj) {
_mesa_error_no_memory(__func__);
+ return NULL;
}
_mesa_initialize_buffer_object(ctx, &obj->Base, name);