Module: Mesa
Branch: master
Commit: 7c4daf8c3759fae9e1ef1e088866680b8574755c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c4daf8c3759fae9e1ef1e088866680b8574755c

Author: Lionel Landwerlin <[email protected]>
Date:   Thu Jul 13 16:29:25 2017 +0100

i965: fix missing NULL return if allocation fails

CID: 1250585
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>

---

 src/mesa/drivers/dri/i965/intel_buffer_objects.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c 
b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index 85cc1a694b..fde6b224cd 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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to