aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/d3dadapter9/drm.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-08-29 18:13:14 +0100
committerEmil Velikov <[email protected]>2018-10-03 13:38:05 +0100
commit6ccc435e7ad92bb0ba77d3fdb48c7127ba71239e (patch)
tree6ca059b425d4b452bcfe76a634d4d852bed0f6d8 /src/gallium/targets/d3dadapter9/drm.c
parent7b8d1b313cd01bb916898d8bb92a566534e37677 (diff)
pipe-loader: move dup(fd) within pipe_loader_drm_probe_fd
Currently pipe_loader_drm_probe_fd takes ownership of the fd given. To match that, pipe_loader_release closes it. Yet we have many instances which do not want the change of ownership, and thus duplicate the fd before passing it to the pipe-loader. Move the dup() within pipe-loader, explicitly document that and document all the cases through the codebase. A trivial git grep -2 pipe_loader_release makes things as obvious as it gets ;-) Cc: Leo Liu <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Axel Davy <[email protected]> Cc: Patrick Rudolph <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Reviewed-by: Axel Davy <[email protected]> (for nine)
Diffstat (limited to 'src/gallium/targets/d3dadapter9/drm.c')
-rw-r--r--src/gallium/targets/d3dadapter9/drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c
index a2a36dbbda9..85b3e10633e 100644
--- a/src/gallium/targets/d3dadapter9/drm.c
+++ b/src/gallium/targets/d3dadapter9/drm.c
@@ -107,7 +107,7 @@ drm_destroy( struct d3dadapter9_context *ctx )
if (drm->dev)
pipe_loader_release(&drm->dev, 1);
- /* The pipe loader takes ownership of the fd */
+ close(drm->fd);
FREE(ctx);
}