[Mesa-dev] [PATCH 1/2] svga: fix context alloc error handling
Eric Engestrom
eric.engestrom at imgtec.com
Tue Jan 23 13:02:31 UTC 2018
On Tuesday, 2018-01-23 00:41:22 +0200, Grazvydas Ignotas wrote:
> 'cleanup' path is dereferencing 'svga' a lot, 'done' is a better choice.
> Found by Coccinelle.
>
> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
Both patches are
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> src/gallium/drivers/svga/svga_context.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
> index af16a99..7b3e9e8 100644
> --- a/src/gallium/drivers/svga/svga_context.c
> +++ b/src/gallium/drivers/svga/svga_context.c
> @@ -132,11 +132,11 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags)
>
> SVGA_STATS_TIME_PUSH(svgascreen->sws, SVGA_STATS_TIME_CREATECONTEXT);
>
> svga = CALLOC_STRUCT(svga_context);
> if (!svga)
> - goto cleanup;
> + goto done;
>
> LIST_INITHEAD(&svga->dirty_buffers);
>
> svga->pipe.screen = screen;
> svga->pipe.priv = priv;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list