From c65a00eaff85160dd556856c8c2eecf3aabdc4d5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 11 Jul 2016 16:46:20 -0700 Subject: [PATCH] vc4: Close our screen's fd on screen close. We're passed in a freshly dup()ed fd on screen create, so we should close it on exit. Debugged by Hugh Cole-Baker. --- src/gallium/drivers/vc4/vc4_screen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 0f0d119b1df..609dc913655 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -82,7 +82,10 @@ vc4_screen_get_vendor(struct pipe_screen *pscreen) static void vc4_screen_destroy(struct pipe_screen *pscreen) { + struct vc4_screen *screen = vc4_screen(pscreen); + vc4_bufmgr_destroy(pscreen); + close(screen->fd); ralloc_free(pscreen); } -- 2.30.2