summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2015-05-05 19:05:31 -0700
committerChad Versace <chad.versace@intel.com>2015-05-07 08:11:21 -0700
commit19b5a82fdafd583317265e86fd13c23e52839131 (patch)
tree83981a9383fc31bf90171f3f02f95b2715fecf10
parent00f3c7baeb3e8f00ce7bc8a1384ef545e648f1d9 (diff)
downloadexternal_mesa3d-19b5a82fdafd583317265e86fd13c23e52839131.zip
external_mesa3d-19b5a82fdafd583317265e86fd13c23e52839131.tar.gz
external_mesa3d-19b5a82fdafd583317265e86fd13c23e52839131.tar.bz2
i915/sync: Return early when calloc fails
Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--src/mesa/drivers/dri/i915/intel_syncobj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_syncobj.c b/src/mesa/drivers/dri/i915/intel_syncobj.c
index 92a246d..92b5b63 100644
--- a/src/mesa/drivers/dri/i915/intel_syncobj.c
+++ b/src/mesa/drivers/dri/i915/intel_syncobj.c
@@ -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;
}