diff options
author | Eric Anholt <[email protected]> | 2016-07-11 16:46:20 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-07-12 15:46:09 -0700 |
commit | c65a00eaff85160dd556856c8c2eecf3aabdc4d5 (patch) | |
tree | f23c2848d5f938b770fd698f1e725e2ff52ab606 | |
parent | c93f6938d5dac1cfbeae7040929c232d70b6feae (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.c | 3 |
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); } |