[Mesa-dev] [PATCH] virgl: close drm fd when destroying virgl screen.
Lepton Wu
lepton at chromium.org
Mon Mar 18 23:40:25 UTC 2019
This fd was create in virgl_drm_screen_create and should be closed
in virgl_drm_screen_destroy.
Signed-off-by: Lepton Wu <lepton at chromium.org>
---
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 01811a0e997..5501fe3ed48 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -973,6 +973,7 @@ virgl_drm_screen_destroy(struct pipe_screen *pscreen)
if (destroy) {
int fd = virgl_drm_winsys(screen->vws)->fd;
util_hash_table_remove(fd_tab, intptr_to_pointer(fd));
+ close(fd);
}
mtx_unlock(&virgl_screen_mutex);
--
2.21.0.225.g810b269d1ac-goog
More information about the mesa-dev
mailing list