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:
committed by
Tapani Pälli
parent
51aa221480
commit
ba089cfa82
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user