vc4: Fix leak of vc4_bos stashed in the context.
authorEric Anholt <eric@anholt.net>
Mon, 15 Dec 2014 04:39:49 +0000 (20:39 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 15 Dec 2014 07:12:11 +0000 (23:12 -0800)
src/gallium/drivers/vc4/vc4_context.c

index 3535ebbb3edf2ed919bd6f4d8be348b8cd37a02c..fd65f432bac34cbf287fbec354d26988eabd1c79 100644 (file)
@@ -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);