From 8f678c95d6ce802ea174bb1ca640fd75ece364f5 Mon Sep 17 00:00:00 2001 From: Mengkejiergeli Ba Date: Tue, 12 Oct 2021 17:50:31 +0800 Subject: [PATCH] va:display: Don't close an fd with negative value Cannot pass negative parameter to close() and thus no need to apply close() when fd < 0. Part-of: --- subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay_drm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay_drm.c b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay_drm.c index d2a32fb..d92569a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay_drm.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvadisplay_drm.c @@ -140,7 +140,6 @@ gst_va_display_drm_create_va_display (GstVaDisplay * display) if (fd < 0) { GST_WARNING_OBJECT (self, "Failed to open %s: %s", self->path, g_strerror (saved_errno)); - close (fd); return 0; } #if HAVE_LIBDRM -- 2.7.4