summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-07-11 16:46:20 -0700
committerEric Anholt <[email protected]>2016-07-12 15:46:09 -0700
commitc65a00eaff85160dd556856c8c2eecf3aabdc4d5 (patch)
treef23c2848d5f938b770fd698f1e725e2ff52ab606
parentc93f6938d5dac1cfbeae7040929c232d70b6feae (diff)
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.
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c3
1 files changed, 3 insertions, 0 deletions
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);
}