[Mesa-dev] [PATCH 2/2] radeonsi: fix memory leak and/or segfaults
Alex Deucher
alexdeucher at gmail.com
Fri Aug 3 08:33:41 PDT 2012
On Fri, Aug 3, 2012 at 11:06 AM, Christian König
<deathsimple at vodafone.de> wrote:
> Fix a stupid typo that could lead to memory
> leaks and/or segfaults.
>
> Signed-off-by: Christian König <deathsimple at vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> 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 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);
> }
> --
> 1.7.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list