summaryrefslogtreecommitdiff
path: root/cros_gralloc
diff options
context:
space:
mode:
Diffstat (limited to 'cros_gralloc')
-rw-r--r--cros_gralloc/gralloc0/tests/gralloctest.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cros_gralloc/gralloc0/tests/gralloctest.c b/cros_gralloc/gralloc0/tests/gralloctest.c
index eea36e4..9d8101c 100644
--- a/cros_gralloc/gralloc0/tests/gralloctest.c
+++ b/cros_gralloc/gralloc0/tests/gralloctest.c
@@ -262,6 +262,8 @@ static struct gralloctest_context *test_init_gralloc()
int err;
hw_module_t const *hw_module;
struct gralloctest_context *ctx = calloc(1, sizeof(*ctx));
+ if (!ctx)
+ return NULL;
err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &hw_module);
if (err)