From b6cd39fc4761a3a6276a373e68510fb7fb735a77 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 6 Oct 2015 16:32:03 -0700 Subject: [PATCH] vc4: Fix a leak of the last color read/write surface on context destroy. --- src/gallium/drivers/vc4/vc4_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c index 87d781d088d..d490fad5167 100644 --- a/src/gallium/drivers/vc4/vc4_context.c +++ b/src/gallium/drivers/vc4/vc4_context.c @@ -188,6 +188,9 @@ vc4_context_destroy(struct pipe_context *pctx) pipe_surface_reference(&vc4->framebuffer.cbufs[0], NULL); pipe_surface_reference(&vc4->framebuffer.zsbuf, NULL); + pipe_surface_reference(&vc4->color_write, NULL); + pipe_surface_reference(&vc4->color_read, NULL); + vc4_program_fini(pctx); ralloc_free(vc4); -- 2.30.2