From: Eric Anholt Date: Mon, 11 Jul 2016 23:46:20 +0000 (-0700) Subject: vc4: Close our screen's fd on screen close. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c65a00eaff85160dd556856c8c2eecf3aabdc4d5;p=mesa.git 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. --- 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); }