[Mesa-dev] [PATCH v2 1/2] intel: gen-decoder: rework how we handle groups

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Jun 6 13:13:17 UTC 2017


On 05/06/17 23:54, Rafael Antognolli wrote:
>
> realloc() does not initialize the newly added memory, unlike calloc(). So you
> can't depend on those new pointers to be zero. It doesn't look like you depend
> on that because you have the nfields variable anyways. But if you really don't
> care about initializing it, you could simply do a realloc (there's no need for
> the calloc part), since if ctx->group->fields is NULL it will act as a simple
> malloc anyway.
>
> With this fixed, this patch is:
>
> Reviewed-by: Rafael Antognolli <rafael.antognolli at intel.com>

Thanks a bunch!




More information about the mesa-dev mailing list