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 <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
Lepton Wu 2019-03-18 16:40:25 -07:00 committed by Gurchetan Singh
parent 08c44b47a9
commit 250fffac15
1 changed files with 1 additions and 0 deletions

View File

@ -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);