i965: fix missing NULL return if allocation fails
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 13 Jul 2017 15:29:25 +0000 (16:29 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 13 Jul 2017 21:50:41 +0000 (22:50 +0100)
CID: 1250585
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/intel_buffer_objects.c

index 85cc1a694bfdfd51a6ea5525966383c50fa90f9a..fde6b224cd49a375d0bac2953d8ea2716dc19858 100644 (file)
@@ -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);