[Mesa-dev] [PATCH 4/7] i965/sync: Return NULL when calloc fails
Chad Versace
chad.versace at intel.com
Fri May 1 13:01:59 PDT 2015
---
src/mesa/drivers/dri/i965/intel_syncobj.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_syncobj.c b/src/mesa/drivers/dri/i965/intel_syncobj.c
index 3bc32df..a425b9e 100644
--- a/src/mesa/drivers/dri/i965/intel_syncobj.c
+++ b/src/mesa/drivers/dri/i965/intel_syncobj.c
@@ -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;
}
--
2.4.0
More information about the mesa-dev
mailing list