libs: va: Add O_CLOEXEC flag at opening drm device.

So any other potential subprocess won't have access to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2391>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-05-06 17:53:51 +02:00 committed by Tim-Philipp Müller
parent de3f6d4ce3
commit 754dca11ef

View file

@ -135,7 +135,7 @@ gst_va_display_drm_create_va_display (GstVaDisplay * display)
int fd, saved_errno = 0;
GstVaDisplayDrm *self = GST_VA_DISPLAY_DRM (display);
fd = open (self->path, O_RDWR);
fd = open (self->path, O_CLOEXEC | O_RDWR);
saved_errno = errno;
if (fd < 0) {
GST_WARNING_OBJECT (self, "Failed to open %s: %s", self->path,