diff options
author | Tapani Pälli <[email protected]> | 2017-05-12 12:18:32 +0300 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-29 16:49:49 +0100 |
commit | 12196d1b76898bc51ad55e2ad69689df35b29494 (patch) | |
tree | 3bcd6e94bfd3b25e8cfe4580f917e981f2146160 /src/egl/drivers/dri2 | |
parent | 628af2bc9690f42957f9799dfc0dbd0614d38d4c (diff) |
egl: check for driver_configs in dri2_display_release
With later commits we'll split and reuse the destroy side of the
function for the initialize_foo error path.
In such cases, driver_configs may be NULL leading to a crash.
Signed-off-by: Tapani Pälli <[email protected]>
[Emil Velikov: reword commit message]
Signed-off-by: Emil Velikov <[email protected]>
Tested-by: Rob Herring <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 405db61d185..eefe3bfc583 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -919,7 +919,7 @@ dri2_display_release(_EGLDisplay *disp) * the ones from the gbm device. As such the gbm itself is responsible * for the cleanup. */ - if (disp->Platform != _EGL_PLATFORM_DRM) { + if (disp->Platform != _EGL_PLATFORM_DRM && dri2_dpy->driver_configs) { for (i = 0; dri2_dpy->driver_configs[i]; i++) free((__DRIconfig *) dri2_dpy->driver_configs[i]); free(dri2_dpy->driver_configs); |