[Mesa-dev] [PATCH mesa 1/2] etnaviv: avoid null dereference in failure path

Nicolai Hähnle nhaehnle at gmail.com
Fri Feb 10 09:26:27 UTC 2017


On 09.02.2017 01:11, Eric Engestrom wrote:
> CID: 1400129

This looks like some internal tracking number; please remove it.

Thanks,
Nicolai

> Signed-off-by: Eric Engestrom <eric at engestrom.ch>
> ---
>  src/gallium/drivers/etnaviv/etnaviv_context.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
> index d767cd1f38..f5fa5c53ae 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_context.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c
> @@ -259,7 +259,7 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
>     screen = etna_screen(pscreen);
>     ctx->stream = etna_cmd_stream_new(screen->pipe, 0x2000, &etna_cmd_stream_reset_notify, ctx);
>     if (ctx->stream == NULL)
> -      goto fail;
> +      return NULL;
>
>     pctx = &ctx->base;
>     pctx->priv = ctx;
>



More information about the mesa-dev mailing list