mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-01 03:18:00 +02:00
backend-drm/drm-gbm: gbm_device_destroy on an invalid gbm device
When EGL initialization fails (failure to create a GLES3 or GLES2 context) we will end up calling gbm_device_destroy() twice, once in init_egl() and once in the drm_backend_create() error path. Given that we should also take care of properly destroying the gbm device when we don't have any inputs for instance, mark the gbm device as NULL to avoid calling gbm_device_destroy() once more when destroying the DRM-backend. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
3c5e6c536f
commit
bb55d86300
1 changed files with 1 additions and 0 deletions
|
|
@ -125,6 +125,7 @@ init_egl(struct drm_backend *b)
|
|||
|
||||
if (drm_backend_create_gl_renderer(b) < 0) {
|
||||
gbm_device_destroy(b->gbm);
|
||||
b->gbm = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue