From 3b1e3a40a80bd874bc97d13846c0380313c6e7e8 Mon Sep 17 00:00:00 2001 From: Patrick Lerda Date: Fri, 26 Sep 2025 17:06:28 +0200 Subject: [PATCH] r600: fix r600_draw_rectangle refcnt imbalance The object buf is referenced at the beginning of the r600_draw_rectangle() function and should be freed at the end. This issue was introduced with cbb6e0277f68. Fixes: cbb6e0277f68 ("r600: stop using util_set_vertex_buffers") Signed-off-by: Patrick Lerda Part-of: --- src/gallium/drivers/r600/r600_pipe_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index 7daf093c3f8..cd23c1c901e 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -201,6 +201,7 @@ void r600_draw_rectangle(struct blitter_context *blitter, rctx->b.set_vertex_buffers(&rctx->b, 1, &vbuffer); util_draw_arrays_instanced(&rctx->b, R600_PRIM_RECTANGLE_LIST, 0, 3, 0, num_instances); + pipe_resource_reference(&buf, NULL); } static void r600_dma_emit_wait_idle(struct r600_common_context *rctx)