i965/sync: Return NULL when calloc fails
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -50,6 +50,8 @@ intel_new_sync_object(struct gl_context *ctx, GLuint id)
|
||||
struct intel_sync_object *sync;
|
||||
|
||||
sync = calloc(1, sizeof(struct intel_sync_object));
|
||||
if (!sync)
|
||||
return NULL;
|
||||
|
||||
return &sync->Base;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user