[Mesa-dev] [PATCH] i965: use rzalloc instead of calloc in brwNewProgram

Juan A. Suarez Romero jasuarez at igalia.com
Thu Nov 3 09:55:53 UTC 2016


On Thu, 2016-11-03 at 11:40 +0200, Tapani Pälli wrote:
> commit cc6aa1d161280f10ded7834d1ec2413bc97589fe changed to using
> rzalloc
> for gl_program creation but one instance for program creation was
> still
> using calloc.
> 
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_program.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_program.c
> b/src/mesa/drivers/dri/i965/brw_program.c
> index 647f138..ffe4c27 100644
> --- a/src/mesa/drivers/dri/i965/brw_program.c
> +++ b/src/mesa/drivers/dri/i965/brw_program.c
> @@ -152,7 +152,7 @@ static struct gl_program *brwNewProgram( struct
> gl_context *ctx,
>              rzalloc(NULL, struct gen4_fragment_program);
>           prog = &g4_prog->base;
>        } else {
> -         prog = CALLOC_STRUCT(brw_program);
> +         prog = rzalloc(NULL, struct brw_program);
>        }
>  
>        if (prog) {


I had exactly the same patch ready to be submitted :)

Reviewed-by: Juan A. Suarez <jasuarez at igalia.com>



	J.A.


More information about the mesa-dev mailing list