[Mesa-dev] [PATCH] radeonsi: Fix memory leak in si_set_constant_buffer.

Brian Paul brianp at vmware.com
Sun Feb 24 08:09:03 PST 2013


On 02/23/2013 06:27 PM, Vinson Lee wrote:
> Fixes resource leak defect reported by Coverity.
>
> Signed-off-by: Vinson Lee<vlee at freedesktop.org>
> ---
>   src/gallium/drivers/radeonsi/si_state.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 769ba0c..a395ec4 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -2523,6 +2523,7 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint i
>
>   	default:
>   		R600_ERR("unsupported %d\n", shader);
> +		FREE(pm4);
>   	}
>
>   	if (cb->buffer !=&rbuffer->b.b)

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list