[Mesa-dev] [PATCH] gallium/r300: initialize pipe_resource::next to NULL

Marek Olšák maraeo at gmail.com
Tue Sep 27 15:38:56 UTC 2016


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Sep 27, 2016 at 5:33 PM, Rob Clark <robdclark at gmail.com> wrote:
> Signed-off-by: Rob Clark <robdclark at gmail.com>
> ---
> I had a scan through the rest of pipe_resource allocations, and I think
> this is the only remaining one (besides r600_alloc_buffer_struct())
> which was using MALLOC_STRUCT()..  sorry 'bout that
>
>  src/gallium/drivers/r300/r300_screen_buffer.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
> index 4747058..24dd92f 100644
> --- a/src/gallium/drivers/r300/r300_screen_buffer.c
> +++ b/src/gallium/drivers/r300/r300_screen_buffer.c
> @@ -163,6 +163,7 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
>      rbuf = MALLOC_STRUCT(r300_resource);
>
>      rbuf->b.b = *templ;
> +    rbuf->b.b.next = NULL;
>      rbuf->b.vtbl = &r300_buffer_vtbl;
>      pipe_reference_init(&rbuf->b.b.reference, 1);
>      rbuf->b.b.screen = screen;
> --
> 2.7.4
>


More information about the mesa-dev mailing list