egl_dri2.c: Open drm device with O_CLOEXEC
Not a good fd to leak.
This commit is contained in:
@@ -990,7 +990,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
|
|||||||
if (!dri2_load_driver(disp))
|
if (!dri2_load_driver(disp))
|
||||||
goto cleanup_conn;
|
goto cleanup_conn;
|
||||||
|
|
||||||
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR);
|
dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR | O_CLOEXEC);
|
||||||
if (dri2_dpy->fd == -1) {
|
if (dri2_dpy->fd == -1) {
|
||||||
_eglLog(_EGL_WARNING,
|
_eglLog(_EGL_WARNING,
|
||||||
"DRI2: could not open %s (%s)", dri2_dpy->device_name,
|
"DRI2: could not open %s (%s)", dri2_dpy->device_name,
|
||||||
|
Reference in New Issue
Block a user