[Mesa-dev] [PATCH 36/40] auxiliary/vl: Don't close the drm fd on failure

Emil Velikov emil.l.velikov at gmail.com
Sat Oct 17 15:58:10 PDT 2015


Ported from an identically named commit in st/xa

commit 35cf3831d71770211f29da6608313dc1f6213d7b
Author: Thomas Hellstrom <thellstrom at vmware.com>
Date:   Thu Jul 3 02:07:36 2014 -0700

    st/xa: Don't close the drm fd on failure v2

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/auxiliary/vl/vl_winsys_dri.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri.c b/src/gallium/auxiliary/vl/vl_winsys_dri.c
index 1cdea44..bc574a2 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri.c
@@ -387,7 +387,7 @@ vl_screen_create(Display *display, int screen)
    if (authenticate == NULL || !authenticate->authenticated)
       goto free_authenticate;
 
-   if (pipe_loader_drm_probe_fd(&scrn->base.dev, fd))
+   if (pipe_loader_drm_probe_fd(&scrn->base.dev, dup(fd)))
       scrn->base.pscreen = pipe_loader_create_screen(scrn->base.dev);
 
    if (!scrn->base.pscreen)
-- 
2.6.1



More information about the mesa-dev mailing list