Mesa (master): vc4: Fix leak of vc4_bos stashed in the context.

Eric Anholt anholt at kemper.freedesktop.org
Mon Dec 15 07:12:47 UTC 2014


Module: Mesa
Branch: master
Commit: 1f1ca8b2ea80f6b538b7f7c0de2ebe8eba862edc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f1ca8b2ea80f6b538b7f7c0de2ebe8eba862edc

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Dec 14 20:39:49 2014 -0800

vc4: Fix leak of vc4_bos stashed in the context.

---

 src/gallium/drivers/vc4/vc4_context.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index 3535ebb..fd65f43 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -431,6 +431,11 @@ vc4_context_destroy(struct pipe_context *pctx)
 
         util_slab_destroy(&vc4->transfer_pool);
 
+        pipe_surface_reference(&vc4->framebuffer.cbufs[0], NULL);
+        pipe_surface_reference(&vc4->framebuffer.zsbuf, NULL);
+        vc4_bo_unreference(&vc4->tile_alloc);
+        vc4_bo_unreference(&vc4->tile_state);
+
         vc4_program_fini(pctx);
 
         ralloc_free(vc4);




More information about the mesa-commit mailing list