diff options
author | Yiwei Zhang <zzyiwei@chromium.org> | 2021-09-28 04:06:06 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-29 07:08:22 +0000 |
commit | afdf87dcd4492dc41256e6257279e0dbb7a93017 (patch) | |
tree | b1c4a31604ed4ad0b7c9d21cc0e5a7ce1fd01abf /cros_gralloc | |
parent | 7fae5d05e63c954eb01b3340f3eee860b9802aeb (diff) | |
download | minigbm-afdf87dcd4492dc41256e6257279e0dbb7a93017.tar.gz |
minigbm: add more error handling especially for oom
This change also fixes a potential prime_fd leak in mediatek backend.
BUG=b:201110412
TEST=CQ
Change-Id: Ia3e10c94b536f83ecfb6580666103fe654bbc616
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3188852
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Diffstat (limited to 'cros_gralloc')
-rw-r--r-- | cros_gralloc/gralloc0/tests/gralloctest.c | 2 |
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) |