i965: Add extra null check in intel_bufferobj_alloc()

Check calloc returned requested memory.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Juha-Pekka Heikkila 2014-08-01 14:38:17 +03:00 committed by Tapani Pälli
parent 51aa221480
commit ba089cfa82

View file

@ -136,6 +136,9 @@ static struct gl_buffer_object *
intel_bufferobj_alloc(struct gl_context * ctx, GLuint name, GLenum target)
{
struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
if (!obj) {
_mesa_error_no_memory(__func__);
}
_mesa_initialize_buffer_object(ctx, &obj->Base, name, target);