radeonsi: fix memory leak and/or segfaults
authorChristian König <deathsimple@vodafone.de>
Fri, 3 Aug 2012 14:51:32 +0000 (16:51 +0200)
committerChristian König <deathsimple@vodafone.de>
Wed, 8 Aug 2012 10:36:49 +0000 (12:36 +0200)
Fix a stupid typo that could lead to memory
leaks and/or segfaults.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/radeonsi_pm4.c

index 0aad78fdcb49f2ac0e250d8b8960837f5b101ed6..12facafbfa891feb0c0fcb3b1f7aa2a68a4c4aee 100644 (file)
@@ -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);
 }