From be42a45e023aed5fd82647719bb81bee49a9a2ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Fri, 3 Aug 2012 16:51:32 +0200 Subject: [PATCH] radeonsi: fix memory leak and/or segfaults MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix a stupid typo that could lead to memory leaks and/or segfaults. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- src/gallium/drivers/radeonsi/radeonsi_pm4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/radeonsi_pm4.c b/src/gallium/drivers/radeonsi/radeonsi_pm4.c index 0aad78fdcb4..12facafbfa8 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_pm4.c +++ b/src/gallium/drivers/radeonsi/radeonsi_pm4.c @@ -119,7 +119,7 @@ void si_pm4_free_state(struct r600_context *rctx, } for (int i = 0; i < state->nbo; ++i) { - si_resource_reference(&state->bo[idx], NULL); + si_resource_reference(&state->bo[i], NULL); } FREE(state); } -- 2.30.2