From e7e0468f73034b9dc0234cc5e0c82dfa69b5ba07 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 1 Oct 2020 13:25:08 +0200 Subject: [PATCH] gallium/util: fix memory-leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I originally wrote this code, I forgot to release the views the code creates, leaking a bit of memory that never gets cleaned up. That's not great, so let's plug it. Fixes: e8a40715a8b ("gallium/util: add blitter-support for stencil-fallback") Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_blitter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index ddb00650660..1de3f754d67 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -2911,4 +2911,7 @@ util_blitter_stencil_fallback(struct blitter_context *blitter, util_blitter_restore_render_cond(blitter); util_blitter_restore_constant_buffer_state(blitter); util_blitter_unset_running_flag(blitter); + + pipe_surface_reference(&dst_view, NULL); + pipe_sampler_view_reference(&src_view, NULL); }