From: Lepton Wu Date: Mon, 18 Mar 2019 23:40:25 +0000 (-0700) Subject: virgl: close drm fd when destroying virgl screen. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=250fffac152f3cbdbea505fc642e5f023c3f3b7e;p=mesa.git virgl: close drm fd when destroying virgl screen. This fd was create in virgl_drm_screen_create and should be closed in virgl_drm_screen_destroy. Signed-off-by: Lepton Wu Reviewed-by: Chia-I Wu --- diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 120e8eda2cd..2cf8b4ba076 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -972,6 +972,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);