mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
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:
parent
51aa221480
commit
ba089cfa82
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue