On 5 July 2017 15:57:10 BST, Tomasz Figa <[email protected]> wrote:
> If dri2_setup_extensions() fails, the "err" variable would not be
> assigned
> causing the error path to access an unitialized variable. Fix it by
> assigning an error message.
> 
> Signed-off-by: Tomasz Figa <[email protected]>

Reviewed-by: Eric Engestrom <[email protected]>

> ---
>  src/egl/drivers/dri2/platform_android.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/egl/drivers/dri2/platform_android.c
> b/src/egl/drivers/dri2/platform_android.c
> index 3be69d87ff..13006fee87 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -1214,8 +1214,10 @@ dri2_initialize_android(_EGLDriver *drv,
> _EGLDisplay *dpy)
>        goto cleanup;
>     }
>  
> -   if (!dri2_setup_extensions(dpy))
> +   if (!dri2_setup_extensions(dpy)) {
> +      err = "DRI2: failed to setup extensions";
>        goto cleanup;
> +   }
>  
>     dri2_setup_screen(dpy);
>  

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to