From: Christian König Date: Fri, 3 Aug 2012 14:51:32 +0000 (+0200) Subject: radeonsi: fix memory leak and/or segfaults X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be42a45e023aed5fd82647719bb81bee49a9a2ac;p=mesa.git radeonsi: fix memory leak and/or segfaults Fix a stupid typo that could lead to memory leaks and/or segfaults. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- 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); }