diff options
author | Emil Velikov <[email protected]> | 2017-05-11 17:21:13 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-29 16:49:58 +0100 |
commit | 7ec07beedf486d8ab901ea3e3e3a87768a051e44 (patch) | |
tree | 835c8b2ba8827ad650f6a71896e881c7df0a6dc2 /src/egl/drivers/dri2 | |
parent | 898d7858f835eb8e027ba2451d27564959f373b5 (diff) |
egl/drm: make use of the dri2_display_destroy() helper
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/platform_drm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 455225e56b0..80e824f3d54 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -679,6 +679,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); + dri2_dpy->fd = -1; disp->DriverData = (void *) dri2_dpy; gbm = disp->PlatformDisplay; @@ -760,10 +761,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) return EGL_TRUE; cleanup: - if (fd >= 0) - close(fd); - - free(dri2_dpy); - disp->DriverData = NULL; + dri2_display_destroy(disp); return _eglError(EGL_NOT_INITIALIZED, err); } |