libs: va: Add O_CLOEXEC flag at opening drm device.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 6 May 2022 15:53:51 +0000 (17:53 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 7 May 2022 09:55:36 +0000 (09:55 +0000)
So any other potential subprocess won't have access to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2386>

subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay_drm.c

index 71bdee5..d225625 100644 (file)
@@ -136,7 +136,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,