i915/sync: Return early when calloc fails
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
00f3c7baeb
commit
19b5a82fda
|
@ -51,6 +51,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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue