Module: Mesa
Branch: master
Commit: be42a45e023aed5fd82647719bb81bee49a9a2ac
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=be42a45e023aed5fd82647719bb81bee49a9a2ac

Author: Christian König <[email protected]>
Date:   Fri Aug  3 16:51:32 2012 +0200

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 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>

---

 src/gallium/drivers/radeonsi/radeonsi_pm4.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/radeonsi_pm4.c 
b/src/gallium/drivers/radeonsi/radeonsi_pm4.c
index 0aad78f..12facaf 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);
 }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to